CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/05/18 17:27:24
Modified files: . : ChangeLog testsuite/misc-ming.all: Makefile.am Added files: testsuite/misc-ming.all: loop_test2.c Log message: * testsuite/misc-ming.all/: Makefile.am, loop_test2.c: New Timeline control test. GNASH FAILS THIS ONE !! CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3277&r2=1.3278 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.119&r2=1.120 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test2.c?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3277 retrieving revision 1.3278 diff -u -b -r1.3277 -r1.3278 --- ChangeLog 18 May 2007 16:33:42 -0000 1.3277 +++ ChangeLog 18 May 2007 17:27:23 -0000 1.3278 @@ -1,5 +1,10 @@ 2007-05-18 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/misc-ming.all/: Makefile.am, loop_test2.c: + New Timeline control test. GNASH FAILS THIS ONE !! + +2007-05-18 Sandro Santilli <[EMAIL PROTECTED]> + * server/dlist.h: document the addAll() and add() methods. * server/asobj/NetStreamGst.cpp: provide a buildFLVPipeline() calling the video/audio versions internally and locking the pipelineMutex. Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.119 retrieving revision 1.120 diff -u -b -r1.119 -r1.120 --- testsuite/misc-ming.all/Makefile.am 18 May 2007 12:59:53 -0000 1.119 +++ testsuite/misc-ming.all/Makefile.am 18 May 2007 17:27:23 -0000 1.120 @@ -73,6 +73,7 @@ root_stop_test \ root_stop_testrunner \ loop_test \ + loop_test2 \ loop_test-Runner \ place_object_test \ move_object_test \ @@ -191,6 +192,7 @@ static_vs_dynamic1_testrunner \ static_vs_dynamic2_testrunner \ getTimer_testrunner \ + loop_test2runner \ $(NULL) if MAKESWF_SUPPORTS_PREBUILT_CLIPS @@ -353,6 +355,19 @@ $(top_builddir)/testsuite/libtestsuite.la \ $(NULL) +loop_test2_SOURCES = \ + loop_test2.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +loop_test2_LDADD = $(MING_LIBS) + +loop_test2.swf: loop_test2 + ./loop_test2 $(top_srcdir)/testsuite/media + +loop_test2runner: $(srcdir)/../generic-testrunner.sh loop_test2.swf + sh $< -f20 $(top_builddir) loop_test2.swf > $@ + chmod 755 $@ key_event_test_SOURCES = \ key_event_test.c \ @@ -1405,6 +1420,7 @@ getTimer_testrunner \ Video-EmbedSquareTestRunner \ NetStream-SquareTestRunner \ + loop_test2runner \ $(NULL) if MAKESWF_SUPPORTS_PREBUILT_CLIPS Index: testsuite/misc-ming.all/loop_test2.c =================================================================== RCS file: testsuite/misc-ming.all/loop_test2.c diff -N testsuite/misc-ming.all/loop_test2.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/loop_test2.c 18 May 2007 17:27:24 -0000 1.1 @@ -0,0 +1,157 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* + * Zou Lunkai, [EMAIL PROTECTED] + * + * Test "Jumping backward to the start of two character's lifetime after depth swap" + * + * Timeline: + * + * Frame | 1 | 2 | 3 | 4 | + * --------+---+---+---+---+ + * Event | |PP*| M | J | + * + * P = place (by PlaceObject2) + * M = move to another depth (by swapDepth) + * J = jump + * * = jump target + * + * Description: + * + * frame2: two static characters are placed + * frame3: the two characters are depth-swapped + * frame4: jump to frame 1 and stop. + * + * Expected behaviour: + * + * A single instance of each characters is created. + * First time in frame1 depths are the original ones, + * second time depths are swapped. + * + * run as ./loop_test + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <ming.h> + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "loop_test2.swf" + + +int +main(int argc, char** argv) +{ + SWFMovie mo; + SWFMovieClip mc1, mc2, dejagnuclip; + SWFShape sh1,sh2; + SWFAction ac; + int i; + + const char *srcdir="."; + if ( argc>1 ) + srcdir=argv[1]; + else + { + //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]); + //return 1; + } + + Ming_init(); + Ming_useSWFVersion (OUTPUT_VERSION); + + mo = newSWFMovie(); + SWFMovie_setDimension(mo, 800, 600); + SWFMovie_setRate(mo, 6); + + // Frame 1: Place dejagnu clip + + dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 800, 600); + SWFMovie_add(mo, (SWFBlock)dejagnuclip); + SWFMovie_nextFrame(mo); + + // Frame 2: Place two static characters + + sh1 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 255, 0, 0); + mc1 = newSWFMovieClip(); + SWFMovieClip_add(mc1, (SWFBlock)sh1); + SWFMovieClip_nextFrame(mc1); + + sh2 = make_fill_square (330, 270, 120, 120, 0, 0, 0, 0, 0, 0); + mc2 = newSWFMovieClip(); + SWFMovieClip_add(mc2, (SWFBlock)sh2); + SWFMovieClip_nextFrame(mc2); + + SWFDisplayItem it1, it2; + it1 = SWFMovie_add(mo, (SWFBlock)mc1); //add movieClip1 to the _root + SWFDisplayItem_setName(it1, "movieClip1"); //name movieClip1 + SWFDisplayItem_addAction(it1, newSWFAction( + "_root.note(this+' constructed');" + "_root.mc1Constructed++;" + ), SWFACTION_CONSTRUCT); + + it2 = SWFMovie_add(mo, (SWFBlock)mc2); //add movieClip2 to the _root + SWFDisplayItem_setName(it2, "movieClip2"); //name movieClip2 + SWFDisplayItem_addAction(it2, newSWFAction( + "_root.note(this+' constructed');" + "_root.mc2Constructed++;"), + SWFACTION_CONSTRUCT); + + SWFMovie_nextFrame(mo); + + // Frame3: swap depths + + SWFMovie_add(mo, (SWFBlock)newSWFAction( + "var mc1_depth = movieClip1.getDepth();" + "var mc2_depth = movieClip2.getDepth();" + "movieClip1.swapDepths(movieClip2);" + "check_equals(movieClip1.getDepth(), mc2_depth);" + "check_equals(movieClip2.getDepth(), mc1_depth);" + )); + + SWFMovie_nextFrame(mo); + + // Frame4: gotoAndStop(2), check.. + + SWFMovie_add(mo, (SWFBlock)newSWFAction( + + "gotoAndStop(2);" + + // Depths have not be restored + "xcheck_equals(movieClip1.getDepth(), mc2_depth);" + "xcheck_equals(movieClip2.getDepth(), mc1_depth);" + + // Chars have not been reconstructed + "xcheck_equals(mc1Constructed, 1);" + "xcheck_equals(mc2Constructed, 1);" + + "totals();" + + )); + SWFMovie_nextFrame(mo); + + //Output movie + puts("Saving " OUTPUT_FILENAME ); + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit