[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: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil... |
Date: |
Mon, 14 May 2007 03:17:18 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/05/14 03:17:18
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Makefile.am
Added files:
testsuite/misc-ming.all: displaylist_depths_test9.c
Log message:
new scenario for Timeline Control
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3182&r2=1.3183
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/displaylist_depths_test9.c?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3182
retrieving revision 1.3183
diff -u -b -r1.3182 -r1.3183
--- ChangeLog 14 May 2007 00:57:37 -0000 1.3182
+++ ChangeLog 14 May 2007 03:17:16 -0000 1.3183
@@ -1,3 +1,9 @@
+2007-05-14 Zou Lunkai <address@hidden>
+
+ * testsuite/misc-ming.all/: displaylist_depths_test9.c, Makefile.am
+ new scenario for Timeline Control, gnash passes.
+ But luckly, caught a bug in ActionDuplicateClip:)
+
2007-05-13 Rob Savoye <address@hidden>
* po/Makefile.am: Add install-data-hook target so the .gmo files
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- testsuite/misc-ming.all/Makefile.am 11 May 2007 11:08:54 -0000 1.112
+++ testsuite/misc-ming.all/Makefile.am 14 May 2007 03:17:17 -0000 1.113
@@ -86,6 +86,7 @@
displaylist_depths_test6 \
displaylist_depths_test7 \
displaylist_depths_test8 \
+ displaylist_depths_test9 \
masks_test \
attachMovieTest \
attachMovieTestRunner \
@@ -169,6 +170,7 @@
displaylist_depths_test6runner \
displaylist_depths_test7runner \
displaylist_depths_test8runner \
+ displaylist_depths_test9runner \
get_frame_number_testrunner \
frame_label_testrunner \
path_format_testrunner \
@@ -533,6 +535,21 @@
sh $< -f20 $(top_builddir) displaylist_depths_test8.swf > $@
chmod 755 $@
+
+displaylist_depths_test9_SOURCES = \
+ displaylist_depths_test9.c \
+ ming_utils.h \
+ ming_utils.c \
+ $(NULL)
+displaylist_depths_test9_LDADD = $(MING_LIBS)
+
+displaylist_depths_test9.swf: displaylist_depths_test9
+ ./displaylist_depths_test9 $(top_srcdir)/testsuite/media
+
+displaylist_depths_test9runner: $(srcdir)/../generic-testrunner.sh
displaylist_depths_test9.swf
+ sh $< -f20 $(top_builddir) displaylist_depths_test9.swf > $@
+ chmod 755 $@
+
masks_test_SOURCES = \
masks_test.c \
ming_utils.h \
@@ -1242,6 +1259,7 @@
displaylist_depths_test6runner \
displaylist_depths_test7runner \
displaylist_depths_test8runner \
+ displaylist_depths_test9runner \
matrix_testrunner \
get_frame_number_testrunner \
frame_label_testrunner \
Index: testsuite/misc-ming.all/displaylist_depths_test9.c
===================================================================
RCS file: testsuite/misc-ming.all/displaylist_depths_test9.c
diff -N testsuite/misc-ming.all/displaylist_depths_test9.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/displaylist_depths_test9.c 14 May 2007 03:17:17
-0000 1.1
@@ -0,0 +1,154 @@
+/*
+ * 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
+ *
+ */
+
+/*
+ * Zou Lunkai, address@hidden
+ *
+ * Test how swapDepth affects DisplayList refresh on gotoAndPlay(current-X).
+ *
+ * run as ./displaylist_depths_test9
+ *
+ * Timeline:
+ *
+ * Frame | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+ * --------+---+---+---+---+---+---+---+
+ * Event | |P | D | D | * | D | J |
+ *
+ * P = place (by PlaceObject2)
+ * D = duplicate a movie clip
+ * J = jump
+ * * = jump target
+ *
+ * Description:
+ *
+ * frame2: character placed at depth -16381 at position (10,200);
+ * frame3: create a script character at depth -10;
+ * frame4: create a script character at depth -20;
+ * frame6: create a script character at depth -30;
+ * frame7: jump back to frame 5 and stop
+ *
+ * Expected behaviour:
+ *
+ * Before the jump we have 4 instances.
+ * After the jump only the timeline instance keeps alive;
+ * Four instances have been constructed in total.
+ */
+
+#include "ming_utils.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "displaylist_depths_test9.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);
+
+ return it;
+}
+
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+ SWFMovieClip dejagnuclip;
+ int i;
+ SWFDisplayItem it1;
+
+
+ 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, "check_equals(static3.getDepth(), -16381);");
+ SWFMovie_nextFrame(mo);
+
+ // Frame 3: create a script instance at depth -10.
+ add_actions(mo,
+ "duplicateMovieClip('static3', 'dup1', -10);"
+ "check_equals(dup1.getDepth(), -10);");
+ SWFMovie_nextFrame(mo);
+
+ // Frame 4: create a script instance at depth -20.
+ add_actions(mo,
+ "duplicateMovieClip('/:static3', 'dup2', -20);"
+ "xcheck_equals(dup2.getDepth(), -20);"); //gnash fails because of a bug in
ActionDuplicateClip
+ SWFMovie_nextFrame(mo);
+
+ // Frame 5: nothing new
+ SWFMovie_nextFrame(mo);
+
+ // Frame 6: create a script instance at depth -30.
+ add_actions(mo,
+ "duplicateMovieClip('_root.static3', 'dup3', -30);"
+ "check_equals(dup3.getDepth(), -30);");
+ SWFMovie_nextFrame(mo);
+
+ // Frame 7: go to frame 5
+ add_actions(mo,
+ "gotoAndStop(5); "
+ "check_equals(typeof(static3), 'movieclip');"
+ "check_equals(typeof(dup1), 'undefined');"
+ "check_equals(typeof(dup2), 'undefined');"
+ "check_equals(typeof(dup3), 'undefined');"
+ "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, 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, 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 <=
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/14
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/14
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/16
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/18
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/18