CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/10/08 07:32:08
Modified files: . : ChangeLog testsuite/misc-ming.all: loop_test9.c Log message: * testsuite/misc-ming.all/loop_test9.c: add a test for RemoveObject having effect for out-of-static-zone depths (now the test would segfault with a gnash version prior the fix for bug #21281 - 0.8.1 for instance). Head is fine. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4566&r2=1.4567 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test9.c?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4566 retrieving revision 1.4567 diff -u -b -r1.4566 -r1.4567 --- ChangeLog 8 Oct 2007 06:55:11 -0000 1.4566 +++ ChangeLog 8 Oct 2007 07:32:07 -0000 1.4567 @@ -1,3 +1,10 @@ +2007-10-08 Sandro Santilli <[EMAIL PROTECTED]> + + * testsuite/misc-ming.all/loop_test9.c: add a test for RemoveObject + having effect for out-of-static-zone depths (now the test would + segfault with a gnash version prior the fix for bug #21281 - 0.8.1 + for instance). Head is fine. + 2007-10-08 Chad Musick <[EMAIL PROTECTED]> * server/vm/AbcHandlers.cpp: More work on the AS3 interpreter -- Index: testsuite/misc-ming.all/loop_test9.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loop_test9.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/misc-ming.all/loop_test9.c 8 Oct 2007 06:33:54 -0000 1.2 +++ testsuite/misc-ming.all/loop_test9.c 8 Oct 2007 07:32:08 -0000 1.3 @@ -59,8 +59,9 @@ main(int argc, char** argv) { SWFMovie mo; - SWFMovieClip mc1, mc2, dejagnuclip; - SWFShape sh1,sh2; + SWFMovieClip mc1, mc2, mc3, dejagnuclip; + SWFShape sh1, sh2, sh3; + SWFDisplayItem it1, it2, it3; SWFAction ac; int i; @@ -98,7 +99,11 @@ SWFMovieClip_add(mc2, (SWFBlock)sh2); SWFMovieClip_nextFrame(mc2); - SWFDisplayItem it1, it2; + sh3 = make_fill_square (330, 270, 120, 180, 0, 255, 0, 0, 255, 0); + mc3 = newSWFMovieClip(); + SWFMovieClip_add(mc3, (SWFBlock)sh3); + SWFMovieClip_nextFrame(mc3); + it1 = SWFMovie_add(mo, (SWFBlock)mc1); //add movieClip1 to the _root SWFDisplayItem_setName(it1, "movieClip1"); //name movieClip1 SWFDisplayItem_addAction(it1, newSWFAction( @@ -115,9 +120,25 @@ SWFACTION_CONSTRUCT); SWFDisplayItem_setDepth(it2, 30000); // depth of movieClip2 is 30000 (13616) + it3 = SWFMovie_add(mo, (SWFBlock)mc3); //add movieClip3 to the _root + SWFDisplayItem_setName(it3, "movieClip3"); //name movieClip2 + SWFDisplayItem_addAction(it3, newSWFAction( + "_root.note(this+' constructed');" + "_root.mc3Constructed++;"), + SWFACTION_CONSTRUCT); + SWFDisplayItem_setDepth(it3, 30001); // depth of movieClip2 is 30001 (13617) + + SWFMovie_add(mo, (SWFBlock)newSWFAction( + "check_equals(movieClip3.getDepth(), 13617);" + )); + SWFMovie_nextFrame(mo); - // Frame3: gotoAndStop(2), check.. + // Frame4: RemoveObject(mc3) - one of those out of static depth zone + + SWFDisplayItem_remove(it3); + + // Frame4: gotoAndStop(2), check.. SWFMovie_add(mo, (SWFBlock)newSWFAction( @@ -128,6 +149,8 @@ "check_equals(movieClip1.getDepth(), -16381);" "check_equals(movieClip2.getDepth(), 13616);" + // movieClip3 was removed, despite it's depth is out of the static zone + "check_equals(typeof(movieClip3), 'undefined');" "gotoAndStop(1);" @@ -143,7 +166,7 @@ "check_equals(mc1Constructed, 1);" "check_equals(mc2Constructed, 1);" - "totals(7);" + "totals(9);" )); SWFMovie_nextFrame(mo); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit