gnash-commit
[Top][All Lists]
Advanced

[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: Wed, 18 Jul 2007 04:01:53 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/07/18 04:01:53

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: Makefile.am 
Added files:
        testsuite/misc-ming.all: unload_movieclip_test1.c 

Log message:
        * testsuite/misc-ming.all/Makefile.am, unload_movieclip_test1.c: add 
          a testcase for unloaded movieclips, Gnash fails.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3754&r2=1.3755
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.142&r2=1.143
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/unload_movieclip_test1.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3754
retrieving revision 1.3755
diff -u -b -r1.3754 -r1.3755
--- ChangeLog   18 Jul 2007 03:39:13 -0000      1.3754
+++ ChangeLog   18 Jul 2007 04:01:51 -0000      1.3755
@@ -1,3 +1,8 @@
+2007-07-18 Zou Lunkai <address@hidden>
+       
+       * testsuite/misc-ming.all/Makefile.am, unload_movieclip_test1.c: add
+         a testcase for unloaded movieclips, Gnash fails.
+       
 2007-07-18 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/TextField.as: Updated test results.

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -b -r1.142 -r1.143
--- testsuite/misc-ming.all/Makefile.am 15 Jul 2007 20:24:39 -0000      1.142
+++ testsuite/misc-ming.all/Makefile.am 18 Jul 2007 04:01:52 -0000      1.143
@@ -86,6 +86,7 @@
        move_object_test \
        place_and_remove_object_test \
        place_and_remove_object_insane_test \
+       unload_movieclip_test1 \
        displaylist_depths_test \
        displaylist_depths_test2 \
        displaylist_depths_test3 \
@@ -182,6 +183,7 @@
        move_object_testrunner \
        place_and_remove_object_testrunner \
        place_and_remove_object_insane_testrunner \
+       unload_movieclip_test1runner \
        goto_frame_testrunner \
        consecutive_goto_frame_testrunner \
        multi_doactions_and_goto_frame_testrunner \
@@ -650,6 +652,18 @@
        sh $< -r5 $(top_builddir) place_and_remove_object_insane_test.swf > $@
        chmod 755 $@
 
+unload_movieclip_test1_SOURCES =       \
+       unload_movieclip_test1.c        \
+       $(NULL)
+unload_movieclip_test1_LDADD = libgnashmingutils.la
+
+unload_movieclip_test1.swf: unload_movieclip_test1
+       ./unload_movieclip_test1 $(top_srcdir)/testsuite/media
+
+unload_movieclip_test1runner: $(srcdir)/../generic-testrunner.sh 
unload_movieclip_test1.swf
+       sh $< -f10 $(top_builddir) unload_movieclip_test1.swf > $@
+       chmod 755 $@
+
 displaylist_depths_test_SOURCES =      \
        displaylist_depths_test.c       \
        $(NULL)
@@ -1546,6 +1560,7 @@
        move_object_testrunner \
        place_and_remove_object_testrunner \
        place_and_remove_object_insane_testrunner \
+       unload_movieclip_test1runner \
        attachMovieTestRunner \
        attachMovieLoopingTestRunner \
        goto_frame_testrunner \

Index: testsuite/misc-ming.all/unload_movieclip_test1.c
===================================================================
RCS file: testsuite/misc-ming.all/unload_movieclip_test1.c
diff -N testsuite/misc-ming.all/unload_movieclip_test1.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/unload_movieclip_test1.c    18 Jul 2007 04:01:52 
-0000      1.1
@@ -0,0 +1,106 @@
+/* 
+ *   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 3 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
+ *
+ * run as ./unload_movieclip_test1
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "unload_movieclip_test1.swf"
+
+
+SWFDisplayItem
+add_static_mc(SWFMovie mo, const char* name, int depth)
+{
+  SWFShape sh;
+  SWFMovieClip mc;
+  SWFDisplayItem it;
+   
+  mc = newSWFMovieClip();
+  SWFMovieClip_nextFrame(mc);
+
+  it = SWFMovie_add(mo, (SWFBlock)mc);
+  SWFDisplayItem_setDepth(it, depth); 
+  SWFDisplayItem_setName(it, name);
+
+  return it;
+}
+
+int
+main(int argc, char** argv)
+{
+  SWFMovie mo;
+  SWFMovieClip dejagnuclip;
+  SWFDisplayItem it;
+
+  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, 2);
+
+  // Frame 1: Place dejagnu clip and init testing variables
+
+  dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
+  SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+  add_actions(mo, "_root.x = 0;");
+  SWFMovie_nextFrame(mo); 
+  
+  // Frame 2: Place a static mc and define onUnload for it
+  
+  it = add_static_mc(mo, "mc", 3);
+  add_actions(mo, "mc.onUnload = function () { _root.x = this._currentframe; 
};");
+  SWFMovie_nextFrame(mo);
+  
+  // Frame 3: Remove the mc to trigger onUnload
+  
+  SWFDisplayItem_remove(it);
+  SWFMovie_nextFrame(mo);
+  
+  // Frame 4: checks
+  
+  xcheck_equals(mo, "_root.x", "1");
+  
+  add_actions(mo, "_root.totals(); stop(); ");
+  SWFMovie_nextFrame(mo);
+
+  //Output movie
+  puts("Saving " OUTPUT_FILENAME );
+  SWFMovie_save(mo, OUTPUT_FILENAME);
+
+  return 0;
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]