[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/NetStre...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/NetStre... |
Date: |
Thu, 17 May 2007 11:06:22 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/17 11:06:22
Modified files:
. : ChangeLog
testsuite/misc-ming.all: NetStream-SquareTest.c
NetStream-SquareTestRunner.cpp
Log message:
* testsuite/misc-ming.all/NetStream-SquareTest.c:
Add self-contained tests.
* testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp:
Adjust to simply run the self-contained tests.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3248&r2=1.3249
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/NetStream-SquareTest.c?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3248
retrieving revision 1.3249
diff -u -b -r1.3248 -r1.3249
--- ChangeLog 17 May 2007 09:29:41 -0000 1.3248
+++ ChangeLog 17 May 2007 11:06:21 -0000 1.3249
@@ -1,3 +1,10 @@
+2007-05-17 Sandro Santilli <address@hidden>
+
+ * testsuite/misc-ming.all/NetStream-SquareTest.c:
+ Add self-contained tests.
+ * testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp:
+ Adjust to simply run the self-contained tests.
+
2007-05-17 Zou Lunkai <address@hidden>
* testsuite/misc-ming.all: getTimer_test.c, Makefile.am
Index: testsuite/misc-ming.all/NetStream-SquareTest.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/NetStream-SquareTest.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/misc-ming.all/NetStream-SquareTest.c 16 May 2007 23:36:25
-0000 1.4
+++ testsuite/misc-ming.all/NetStream-SquareTest.c 17 May 2007 11:06:22
-0000 1.5
@@ -90,12 +90,37 @@
if(a == NULL) return -1;
SWFMovie_add(mo, (SWFBlock)a);
SWFMovie_add(mo, newSWFAction(
+
"stream.onStatus = function(info) {"
+
+ // Ignore Buffer.Flush for now
+ " if ( info.code == 'NetStream.Buffer.Flush' ) return; "
+
+ // Print some info
" _root.note('onStatus('+info.code+') called'); "
- //" _root.note(' bufferLength:'+stream.bufferLength+'
bufferTime:'+stream.bufferTime);"
- //" _root.note(' bytesLoaded:'+stream.bytesLoaded+'
bytesTotal:'+stream.bytesTotal);"
- //" _root.note(' currentFps:'+stream.currentFps+'
time:'+stream.time);"
+ " _root.note(' bufferLength:'+stream.bufferLength+"
+ " ' bytesLoaded:'+stream.bytesLoaded+"
+ " ' currentFps:'+stream.currentFps+' time:'+stream.time);"
+
+ " if ( info.code == 'NetStream.Play.Stop' )"
+ " {"
+ " _root.check(this instanceOf NetStream); "
+ " _root.check_equals(this.bufferTime, 2); "
+ " _root.check_equals(this.bytesTotal, 46893); "
+ " this.stopNotified = true;"
+ " _root.nextFrame();"
+ " }"
+#if 0
+ " else if ( info.code == 'NetStream.Buffer.Empty' &&
this.stopNotified ) "
+ " {"
+ " check ( this.stopNotified )
+ " this.close();"
+ " _root.nextFrame();"
+ " }"
+#endif
+
"};"
+
"stream.onCuePoint = function(info) {"
" _root.note('onCuePoint('+info+') called'); "
"};"
@@ -106,6 +131,11 @@
SWFMovie_nextFrame(mo);
+ SWFMovie_add(mo, newSWFAction("totals(); stop();"));
+
+ SWFMovie_nextFrame(mo);
+
+
/* Output movie */
puts("Saving " OUTPUT_FILENAME );
SWFMovie_save(mo, OUTPUT_FILENAME);
Index: testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp 16 May 2007
16:13:06 -0000 1.1
+++ testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp 17 May 2007
11:06:22 -0000 1.2
@@ -45,13 +45,20 @@
sprite_instance* root = tester.getRootMovie();
assert(root);
- // Just loop twice, so to catch crashes...
- // TODO: lots of more tests :)
- size_t framecount = root->get_frame_count();
- for (size_t i=0; i<framecount*2; ++i)
+ // On NetStatus.Play.Stop we jump to last frame and stop,
+ // so this loop is about equivalent to running a
+ // generic self-contained test.
+ //
+ // When all possible tests are implemented as self-contained, we'll
+ // add tests that can't be self-contained.
+ //
+ while (root->get_current_frame() < 2)
{
- check_equals(root->get_current_frame(), i%framecount);
tester.advance();
+
+ // sleep to give the NetStream a chance to load data and
trigger notifications
+ // needs more analisys to find a good way for doing this..
+ sleep(1);
}
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/NetStre...,
Sandro Santilli <=