CVSROOT: /sources/gnash Module name: gnash Changes by: Benjamin Wolsey <bwy> 07/11/23 12:53:26
Modified files: . : ChangeLog testsuite/actionscript.all: NetStream.as Log message: * testsuite/actionscript.all/NetStream.as: add missing tests for various functions. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4936&r2=1.4937 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/NetStream.as?cvsroot=gnash&r1=1.13&r2=1.14 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4936 retrieving revision 1.4937 diff -u -b -r1.4936 -r1.4937 --- ChangeLog 23 Nov 2007 12:36:39 -0000 1.4936 +++ ChangeLog 23 Nov 2007 12:53:26 -0000 1.4937 @@ -1,3 +1,8 @@ +2007-11-23 Benjamin Wolsey <[EMAIL PROTECTED]> + + * testsuite/actionscript.all/NetStream.as: add missing tests for + various functions. + 2007-11-23 Sandro Santilli <[EMAIL PROTECTED]> * server/: stream.h, types.cpp: improved dox. Index: testsuite/actionscript.all/NetStream.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/NetStream.as,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- testsuite/actionscript.all/NetStream.as 29 Sep 2007 16:22:58 -0000 1.13 +++ testsuite/actionscript.all/NetStream.as 23 Nov 2007 12:53:26 -0000 1.14 @@ -20,25 +20,31 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: NetStream.as,v 1.13 2007/09/29 16:22:58 strk Exp $"; +rcsid="$Id: NetStream.as,v 1.14 2007/11/23 12:53:26 bwy Exp $"; #include "check.as" -#if OUTPUT_VERSION < 7 +#if OUTPUT_VERSION < 6 // A Player version >= 7 can // still provide the class, altought limiting it's use //check_equals(typeof(NetStream), undefined); -#else // OUTPUT_VERSION >= 7 +#else // OUTPUT_VERSION >= 6 check_equals(typeof(NetStream), 'function'); var netstreamObj = new NetStream; + +/* Constructor */ + // test the NetStream constuctor check_equals ( typeof(netstreamObj), 'object' ); + +/* Subscriber Methods */ + // test the NetStream::close method check_equals ( typeof(netstreamObj.close), 'function' ); // test the NetStream::pause method @@ -49,10 +55,37 @@ check_equals ( typeof(netstreamObj.seek), 'function' ); // test the NetStream::setBufferTime method check_equals ( typeof(netstreamObj.setBufferTime), 'function'); +// receiveAudio (media server) +xcheck_equals ( typeof(netstreamObj.receiveAudio()), 'function'); +// receiveVideo (media server) +xcheck_equals ( typeof(netstreamObj.receiveVideo()), 'function'); + // SWF7 up is case-sensitive ! check_equals ( typeof(netstreamObj.setbuffertime), 'undefined'); + +/* Publisher Methods */ + +// For use with a media server, from SWF6 +// test attachAudio +xcheck_equals ( typeof(netstreamObj.attachAudio()), 'function'); +// test attachVideo +xcheck_equals ( typeof(netstreamObj.attachVideo()), 'function'); +// test publish +xcheck_equals ( typeof(netstreamObj.publish()), 'function'); +// test send +xcheck_equals ( typeof(netstreamObj.send()), 'function'); + + +/* Event Handlers */ + +check_equals(typeof(netstreamObj.onPlayStatus), 'undefined'); +netstreamObj.onPlayStatus = 4; +check_equals(typeof(netstreamObj.onPlayStatus), 'number'); +netstreamObj.onPlayStatus = "str"; +check_equals(typeof(netstreamObj.onPlayStatus), 'string'); + check_equals(typeof(netstreamObj.onStatus), 'undefined'); netstreamObj.onStatus = 4; check_equals(typeof(netstreamObj.onStatus), 'number'); @@ -72,5 +105,33 @@ check_equals(typeof(netstreamObj.onMetaData), 'string'); -#endif // OUTPUT_VERSION >= 7 +/* Properties */ + +// currentFps (read-only) +xcheck_equals ( typeof(netstreamObj.currentFps), 'number' ); +// bufferLength (read-only) +check_equals ( typeof(netstreamObj.bufferLength), 'number' ); +// bufferTime +check_equals ( typeof(netstreamObj.bufferTime), 'number' ); +// liveDelay (read-only) +xcheck_equals ( typeof(netstreamObj.liveDelay), 'number' ); +// time (read-only) +check_equals ( typeof(netstreamObj.time), 'number' ); + + +/* Two properties added in SWF7 */ + +// bytesLoaded (read-only) +check_equals ( typeof(netstreamObj.bytesLoaded), 'number' ); +// bytesLoaded (read-only) +check_equals ( typeof(netstreamObj.bytesTotal), 'number' ); + + +/* Writeable Properties */ + +// bufferTime (the only writeable property?) +netstreamObj.setBufferTime(10); +check_equals(netstreamObj.bufferTime, 10); + +#endif // OUTPUT_VERSION >= 6 totals(); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit