CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 08/02/14 18:42:51
Modified files: . : ChangeLog testsuite/misc-ming.all: loadMovieTest.c loadMovieTestRunner.cpp Log message: Test that clip event handlers defined for a clip are copied to movies loaded into them. Improve the test runner to follow instructions of the self-contained one and add consistency checking (failing with Gnash, I'm working to fix it). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5652&r2=1.5653 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loadMovieTest.c?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loadMovieTestRunner.cpp?cvsroot=gnash&r1=1.16&r2=1.17 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5652 retrieving revision 1.5653 diff -u -b -r1.5652 -r1.5653 --- ChangeLog 14 Feb 2008 17:49:12 -0000 1.5652 +++ ChangeLog 14 Feb 2008 18:42:50 -0000 1.5653 @@ -1,3 +1,12 @@ +2008-02-14 Sandro Santilli <[EMAIL PROTECTED]> + + * testsuite/misc-ming.all/: loadMovieTest.c, loadMovieTestRunner.cpp: + Test that clip event handlers defined for a clip are copied to + movies loaded into them. Improve the test runner to follow + instructions of the self-contained one and add consistency checking + (failing with Gnash, I'm working to fix it). + + 2008-02-14 Benjamin Wolsey <[EMAIL PROTECTED]> * server/stream.cpp: also check for overflow of a signed int to keep Index: testsuite/misc-ming.all/loadMovieTest.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loadMovieTest.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- testsuite/misc-ming.all/loadMovieTest.c 14 Feb 2008 16:48:08 -0000 1.8 +++ testsuite/misc-ming.all/loadMovieTest.c 14 Feb 2008 18:42:51 -0000 1.9 @@ -129,9 +129,10 @@ SWFDisplayItem_moveTo(it, x, y); snprintf(buf, BUFSIZE, - "_level0.coverart.onUnload = function() {" - " _root.note(this+'.onUnload called');" - "};" + //"_root.note(this+'.on(RollOver) ... ');" + //"_level0.coverart.onUnload = function() {" + //" _root.note(this+'.onUnload called');" + //"};" "_level0.coverart.onMouseDown = function() {" //" _root.note('_url is '+this._url);" " var lastUrlComponent = this._url.substring(this._url.lastIndexOf('/')+1);" @@ -141,7 +142,12 @@ " _root.check_equals(this.getBytesLoaded(), this.getBytesTotal());" " _root.check(this.getBytesLoaded() > 0);" /* assuming something was loaded here */ " _root.note('bytesLoaded: '+this.getBytesLoaded());" - " if ( Key.isDown(Key.SHIFT) ) _root.totals();" + " if ( Key.isDown(Key.SHIFT) ) { " + " trace('SHIFT-click on coverart...');" + //" _root.note('SHIFT-click on coverart...');" + " _root.totals(18, '"__FILE__"');" + " _root.END_OF_TEST = true;" + " }" " else _root.note('2 tests run');" "};" , __FILE__, __LINE__); @@ -305,8 +311,8 @@ add_actions(mo, "note('Click on each image to load it into the container on the right.');" - "note('Click on the container to run tests after each load.');" - "note('Shift-click on the container to get results printed.');" + "note('After each load, click on the container.');" + "note('Finally, shift-click on the container to get results printed.');" "_level0.expectLoaded = 'loadMovieTest.swf';" // TODO: add self-contained tests after each load // like for the DragAndDropTest.as movie Index: testsuite/misc-ming.all/loadMovieTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loadMovieTestRunner.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- testsuite/misc-ming.all/loadMovieTestRunner.cpp 21 Jan 2008 23:26:51 -0000 1.16 +++ testsuite/misc-ming.all/loadMovieTestRunner.cpp 14 Feb 2008 18:42:51 -0000 1.17 @@ -26,6 +26,8 @@ #include "dlist.h" #include "log.h" #include "URL.h" +#include "VM.h" +#include "string_table.h" #include "check.h" #include <string> @@ -125,6 +127,10 @@ // Check scribbling on the lynch checkScribbling(); + // Run 'coverart' tests.. + tester->movePointerTo(640,180); + tester->click(); tester->advance(); + // Click on the second (green) tester->movePointerTo(280, 80); check(tester->isMouseOverMouseEntity()); @@ -140,6 +146,10 @@ // Check scribbling on the jpeg checkScribbling(); + // Run 'coverart' tests.. + tester->movePointerTo(640,180); + tester->click(); tester->advance(); + // Click on the third (offspring) tester->movePointerTo(480, 80); check(tester->isMouseOverMouseEntity()); @@ -152,5 +162,27 @@ // Check scribbling on the offspring checkScribbling(); + + // Run 'coverart' tests.. + tester->movePointerTo(640,180); + tester->click(); tester->advance(); + + // Get summary ... + tester->pressKey(key::SHIFT); + tester->click(); tester->advance(); + tester->releaseKey(key::SHIFT); + + // Consistency checking + string_table& st = root->getVM().getStringTable(); + as_value eot; + // It's an swf6, so lowercase 'END_OF_TEST' + bool endOfTestFound = root->get_member(st.find("end_of_test"), &eot); + check(endOfTestFound); + if ( endOfTestFound ) + { + //cerr << eot.to_debug_string() << endl; + check_equals(eot.to_bool(), true); + } + } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit