[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil... |
Date: |
Thu, 10 May 2007 21:32:21 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/10 21:32:21
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Makefile.am
Added files:
testsuite/misc-ming.all: displaylist_depths_test4.c
Log message:
* testsuite/misc-ming.all/: Makefile.am,
displaylist_depths_test4.c:
new scenario for Timeline Control (see wiki for more details).
NOTE: Gnash fails this one !!
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3157&r2=1.3158
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/displaylist_depths_test4.c?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3157
retrieving revision 1.3158
diff -u -b -r1.3157 -r1.3158
--- ChangeLog 10 May 2007 15:50:20 -0000 1.3157
+++ ChangeLog 10 May 2007 21:32:21 -0000 1.3158
@@ -1,5 +1,11 @@
2007-05-10 Sandro Santilli <address@hidden>
+ * testsuite/misc-ming.all/: Makefile.am, displaylist_depths_test4.c:
+ new scenario for Timeline Control (see wiki for more details).
+ NOTE: Gnash fails this one !!
+
+2007-05-10 Sandro Santilli <address@hidden>
+
* testsuite/anaylse-results.sh: print an header before the actual
results; don't limit depth of search for summary files.
* Makefile.am, add an anal rule to run the test results analyzer.
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- testsuite/misc-ming.all/Makefile.am 10 May 2007 15:10:42 -0000 1.107
+++ testsuite/misc-ming.all/Makefile.am 10 May 2007 21:32:21 -0000 1.108
@@ -81,6 +81,7 @@
displaylist_depths_test \
displaylist_depths_test2 \
displaylist_depths_test3 \
+ displaylist_depths_test4 \
masks_test \
attachMovieTest \
attachMovieTestRunner \
@@ -159,6 +160,7 @@
displaylist_depths_testrunner \
displaylist_depths_test2runner \
displaylist_depths_test3runner \
+ displaylist_depths_test4runner \
get_frame_number_testrunner \
frame_label_testrunner \
path_format_testrunner \
@@ -453,6 +455,20 @@
sh $< -f20 $(top_builddir) displaylist_depths_test3.swf > $@
chmod 755 $@
+displaylist_depths_test4_SOURCES = \
+ displaylist_depths_test4.c \
+ ming_utils.h \
+ ming_utils.c \
+ $(NULL)
+displaylist_depths_test4_LDADD = $(MING_LIBS)
+
+displaylist_depths_test4.swf: displaylist_depths_test4
+ ./displaylist_depths_test4 $(top_srcdir)/testsuite/media
+
+displaylist_depths_test4runner: $(srcdir)/../generic-testrunner.sh
displaylist_depths_test4.swf
+ sh $< -f20 $(top_builddir) displaylist_depths_test4.swf > $@
+ chmod 755 $@
+
masks_test_SOURCES = \
masks_test.c \
ming_utils.h \
@@ -1157,6 +1173,7 @@
displaylist_depths_testrunner \
displaylist_depths_test2runner \
displaylist_depths_test3runner \
+ displaylist_depths_test4runner \
matrix_testrunner \
get_frame_number_testrunner \
frame_label_testrunner \
Index: testsuite/misc-ming.all/displaylist_depths_test4.c
===================================================================
RCS file: testsuite/misc-ming.all/displaylist_depths_test4.c
diff -N testsuite/misc-ming.all/displaylist_depths_test4.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/displaylist_depths_test4.c 10 May 2007 21:32:21
-0000 1.1
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2007 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
+ *
+ */
+
+/*
+ * Sandro Santilli, address@hidden
+ *
+ * Test how swapDepth affects DisplayList refresh on gotoAndPlay(current-X).
+ *
+ * run as ./displaylist_depths_test4
+ *
+ * Timeline:
+ *
+ * Frame | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+ * --------+---+---+---+---+---+---+---+
+ * Event | | P | | M | M | | J |
+ *
+ * P = place (by PlaceObject2)
+ * M = move (matrix transform by PlaceObject2)
+ * J = jump
+ *
+ * Description:
+ *
+ * frame2: character placed at depth -16381 at position (10,200)
+ * frame4: position of instance at depth -16381 shifted to the right (50,200)
+ * frame5: position of instance at depth -16381 shifted to the right (100,200)
+ * frame7: jump back to frame 4
+ *
+ * Expected behaviour on jump back:
+ *
+ * Before the jump we have a single instance at depth -16381 and position
100,200.
+ * After the jump we have the same instances at depth -16381, repositioned at
20,200.
+ * A single instance has been constructed in total.
+ * Soft references to the instance created before the jump-back still point
to the same instance.
+ *
+ */
+
+#include "ming_utils.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+// We need version 7 to use getInstanceAtDepth()
+#define OUTPUT_VERSION 7
+#define OUTPUT_FILENAME "displaylist_depths_test4.swf"
+
+SWFDisplayItem add_static_mc(SWFMovie mo, const char* name, int depth, int x,
int y, int width, int height);
+
+SWFDisplayItem
+add_static_mc(SWFMovie mo, const char* name, int depth, int x, int y, int
width, int height)
+{
+ SWFShape sh;
+ SWFMovieClip mc, mc2;
+ SWFDisplayItem it;
+
+ sh = make_fill_square (-(width/2), -(height/2), width, height, 255, 0,
0, 255, 0, 0);
+ mc = newSWFMovieClip();
+ SWFMovieClip_add(mc, (SWFBlock)sh);
+
+ SWFMovieClip_nextFrame(mc);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc);
+ SWFDisplayItem_setDepth(it, depth);
+ SWFDisplayItem_moveTo(it, x, y);
+ SWFDisplayItem_setName(it, name);
+ SWFDisplayItem_addAction(it, newSWFAction(
+ "_root.note(this+' onClipConstruct');"
+ " _root.check_equals(typeof(_root), 'movieclip');"
+ " if ( isNaN(_root.depth3Constructed) ) {"
+ " _root.depth3Constructed=1; "
+ " _root.note('_root.depth3Constructed set to
'+_root.depth3Constructed);"
+ " } else {"
+ " _root.depth3Constructed++;"
+ " _root.note('_root.depth3Constructed set to
'+_root.depth3Constructed);"
+ " }"
+ ), SWFACTION_CONSTRUCT);
+
+ return it;
+}
+
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+ SWFMovieClip dejagnuclip;
+ int i;
+ SWFDisplayItem it1,it2,it3,it4;
+
+
+ const char *srcdir=".";
+ if ( argc>1 )
+ srcdir=argv[1];
+ else
+ {
+ //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+ //return 1;
+ }
+
+ Ming_init();
+ mo = newSWFMovieWithVersion(OUTPUT_VERSION);
+ SWFMovie_setDimension(mo, 800, 600);
+ SWFMovie_setRate (mo, 2);
+
+ dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10,
0, 0, 800, 600);
+ SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+ SWFMovie_nextFrame(mo);
+
+ // Frame 2: Add a static movieclip at depth 3 with origin at 10,200
+ it1 = add_static_mc(mo, "static3", 3, 10, 200, 20, 20);
+ add_actions(mo,
+ "static3.myThing = 'guess';"
+ "check_equals(static3._x, 10);"
+ "check_equals(static3.myThing, 'guess');"
+ "check_equals(static3.getDepth(), -16381);"
+ );
+ SWFMovie_nextFrame(mo);
+
+ // Frame 3: nothing new
+ SWFMovie_nextFrame(mo);
+
+ // Frame 4: move character at depth 3 to position 50,200
+ SWFDisplayItem_moveTo(it1, 50, 200);
+ add_actions(mo,
+ "check_equals(static3._x, 50);"
+ "check_equals(static3.getDepth(), -16381);"
+ );
+ SWFMovie_nextFrame(mo);
+
+ // Frame 5: move character at depth 3 to position 100,200
+ SWFDisplayItem_moveTo(it1, 200, 200);
+ add_actions(mo,
+ "check_equals(static3.myThing, 'guess');"
+ "check_equals(static3._x, 200);"
+ "check_equals(static3.getDepth(), -16381);"
+ );
+ SWFMovie_nextFrame(mo);
+
+ // Frame 6: nothing new
+ SWFMovie_nextFrame(mo);
+
+ // Frame 7: go to frame 3
+ add_actions(mo,
+
+ "check_equals(static3.myThing, 'guess');"
+
+ // Store a reference to the static3 instance
+ // before jumping back
+ "dynRef = static3;"
+
+ // this reset char at depth -16381 to be at position 50,200
+ "gotoAndStop(4);"
+
+ // Static3 refers to same instance
+ "xcheck_equals(static3.myThing, 'guess');" // gnash fails by
creating a new instance !
+ "check_equals(static3.getDepth(), -16381);"
+
+ // But it has now be reset to position 50,100 as specified
+ // by PlaceObject2 tag in frame 4
+ "check_equals(static3._x, 50);"
+
+ // The reference still refers to the same instance
+ // (see http://www.gnashdev.org/wiki/index.php/SoftReferences)
+ "xcheck_equals(dynRef.myThing, 'guess');" // gnash fails by
creating a new instance!
+ "check_equals(dynRef.getDepth(), -16381);"
+ "check_equals(typeof(dynRef), 'movieclip');"
+ "check_equals(dynRef._x, 50);"
+ "check_equals(dynRef, static3);"
+
+ // A single instance is created in total
+ "xcheck_equals(depth3Constructed, 1);" // gnash fails by
creating a new instance!
+
+ "totals();"
+ );
+ SWFMovie_nextFrame(mo);
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/09
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/10
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/10
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...,
Sandro Santilli <=
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/10
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/11
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/11
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Zou Lunkai, 2007/05/13
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/14