CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai <zoulunkai> 07/11/15 02:59:17
Modified files: . : ChangeLog testsuite/misc-swfc.all: registerclass_test3.sc Log message: * testsuite/misc-swfc.all/registerclass_test3.sc: add tests to for youtube player2.swf and caught the bug. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4863&r2=1.4864 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/registerclass_test3.sc?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4863 retrieving revision 1.4864 diff -u -b -r1.4863 -r1.4864 --- ChangeLog 14 Nov 2007 22:56:09 -0000 1.4863 +++ ChangeLog 15 Nov 2007 02:59:17 -0000 1.4864 @@ -1,3 +1,8 @@ +2007-11-15 Zou Lunkai <[EMAIL PROTECTED]> + + * testsuite/misc-swfc.all/registerclass_test3.sc: add tests to for youtube + player2 and caught the bug. + 2007-11-14 Sandro Santilli <[EMAIL PROTECTED]> * testsuite/swfdec/PASSING: sync'd with results from current swfdec Index: testsuite/misc-swfc.all/registerclass_test3.sc =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-swfc.all/registerclass_test3.sc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- testsuite/misc-swfc.all/registerclass_test3.sc 14 Nov 2007 10:35:43 -0000 1.5 +++ testsuite/misc-swfc.all/registerclass_test3.sc 15 Nov 2007 02:59:17 -0000 1.6 @@ -22,22 +22,64 @@ * Test registerClass * * Description: + * frame1: tests simulate the layout of youtube player2.swf * frame2: export libItem1, export libItem2 * frame3: DoInitAction(libItem1), DoInitAction(libItem2), PlaceObject(libItem2) + * "Object.registerClass('libItem1', theClass1)" is called in DoInitAction(libItem1) + * "Object.registerClass('libItem2', theClass2)" is called in DoInitAction(libItem2) * Observed: * the effect of "Object.registerClass('libItem2', theClass2)" is not visible - * in DoInitAction(libItem2), but in next frame. Note: there's no attachMovie for libItem2. + * in DoInitAction(libItem2). Note: there's no attachMovie for libItem2 in DoInitAction(libItem2) */ // use swf6 for case sensitiviness .flash bbox=800x600 filename="registerclass_test3.sc" background=white version=6 fps=12 .frame 1 - .action: + .box b1 fill=green width=100 height=100 + + .sprite xxx + .end + + .initaction xxx: + // make sure Dejagnu is available in the first frame #include "Dejagnu.sc" .end - .box b1 fill=green width=100 height=100 + // Define fullDisplay and export it + .sprite fullDisplay + .end + + .action: + check_equals(typeof(player.movie), 'movieclip'); + check_equals(player.movie.__proto__, logic_Movie.prototype); + player.movie.setMovie(); + check_equals(_root.testvar, 100); + .end + + .sprite id141 + // Place a child sprite name it as 'movie' + .put movie=fullDisplay + .end + + // Place sprite id141 and name it as 'player' + .put player=id141 + + // Define _Packages.logic.Movie and export it + .sprite _Packages.logic.Movie + .end + + // Define class logic_Movie + .initaction _Packages.logic.Movie: + logic_Movie = function() {}; + logic_Movie.prototype = new MovieClip(); + logic_Movie.prototype.setMovie = function () { _root.testvar = 100; }; + .end + + // register sprite player.movie to class logic_Movie + .initaction fullDisplay: + Object.registerClass("fullDisplay", logic_Movie); + .end .frame 2 @@ -105,7 +147,7 @@ .frame 5 .action: - totals(12); + totals(15); stop(); .end _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit