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/loop_te...


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/loop_te...
Date: Tue, 04 Dec 2007 03:42:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/12/04 03:42:31

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: loop_test10.c 
        testsuite/misc-swfc.all: Makefile.am 
Added files:
        testsuite/misc-swfc.all: mouse_drag_test.sc 

Log message:
        * testsuite/misc-swfc.all/Makefile.am, mouse_drag_test.sc: new test file
          for mouse dragging, fix this should help fixing zoonmheng.swf.
        * testsuite/misc-ming.all/loop_test10.c: more tests for name synthesis,
          all passed.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5073&r2=1.5074
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test10.c?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/Makefile.am?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/mouse_drag_test.sc?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5073
retrieving revision 1.5074
diff -u -b -r1.5073 -r1.5074
--- ChangeLog   3 Dec 2007 20:48:50 -0000       1.5073
+++ ChangeLog   4 Dec 2007 03:42:30 -0000       1.5074
@@ -1,3 +1,10 @@
+2007-12-04 Zou Lunkai <address@hidden>
+       
+       * testsuite/misc-swfc.all/Makefile.am, mouse_drag_test.sc: new test file
+         for mouse dragging, fix this should help fixing zoonmheng.swf.
+       * testsuite/misc-ming.all/loop_test10.c: more tests for name synthesis,
+         all passed.
+
 2007-12-03 Benjamin Wolsey <address@hidden>
 
        * libmedia/MediaParser.h, libmedia/sdl/MediaParserFfmpeg.h: pass pointer

Index: testsuite/misc-ming.all/loop_test10.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loop_test10.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-ming.all/loop_test10.c       3 Dec 2007 07:06:15 -0000       
1.3
+++ testsuite/misc-ming.all/loop_test10.c       4 Dec 2007 03:42:30 -0000       
1.4
@@ -17,6 +17,8 @@
  */ 
 
 /* 
+ * ==case1==
+ *
  * Timeline:
  * 
  *   Frame  | 1 | 2 | 3 | 4 | 5 | 6 |
@@ -47,6 +49,48 @@
  *   we need a temporary displaylist when jumping back, otherwise cann't keep 
mc3 alive
  *   in the current design attempt.
  *
+ *
+ * ==case2==
+ *
+ * timeline:
+ *
+ *   Frame  | 1 | 2 |
+ *  --------+---+---+
+ *   Event  | P | R |
+ *
+ * Description:
+ *
+ *  frame1: place an unnamed sprite 
+ *  frame2: remove the sprite
+ *
+ * Observed behaviour:
+ *  
+ *  (1)before loop-back, the sprite has a synthesized name instance4
+ *  (2)after loop-back, the sprite has a synthesized name instance5
+ *
+ *
+ *  ==case3==
+ *
+ * timeline:
+ *
+ *   Frame  | 1 | 2 |
+ *  --------+---+---+
+ *   Event  | P |   |
+ *
+ * Description:
+ *
+ *  frame1: place an unnamed sprite 
+ *  frame2: do nothing
+ *
+ * Observed behaviour:
+ *  
+ *  (1)before loop-back, the sprite has a synthesized name instance7
+ *  (2)after loop-back, the sprite still has the name instance7
+ *
+ *  (3)but when placing another unnamed sprite after the loop back,
+ *     the new instance gets a name instance9. 
+ *
+ *  Deduction on (3): instance8 was created and discarded during the loop-back.
  */
 
 
@@ -56,7 +100,7 @@
 
 #include "ming_utils.h"
 
-#define OUTPUT_VERSION 6
+#define OUTPUT_VERSION 7
 #define OUTPUT_FILENAME "loop_test10.swf"
 
 
@@ -65,7 +109,11 @@
 {
   SWFMovie mo;
    SWFDisplayItem it1, it2, it3;
+  SWFDisplayItem it4, it41;
+  SWFDisplayItem it5, it51;
   SWFMovieClip mc1, mc2, mc3, dejagnuclip;
+  SWFMovieClip mc4, mc41;
+  SWFMovieClip mc5, mc51;
   SWFShape  sh1, sh2, sh3;
   SWFAction ac;
   int i;
@@ -84,11 +132,11 @@
   
   mo = newSWFMovie();
   SWFMovie_setDimension(mo, 800, 600);
-  SWFMovie_setRate(mo, 2);
+  SWFMovie_setRate(mo, 12);
 
   dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
   SWFMovie_add(mo, (SWFBlock)dejagnuclip);
-  add_actions(mo, " haslooped = false; "
+  add_actions(mo, " haslooped1=false; haslooped2=false; haslooped3=false;"
                   " mc1Initialized=0; mc1Unloaded=0;"
                   " mc2Initialized=0; mc2Unloaded=0;"
                   " mc3Initialized=0; mc3Unloaded=0;"
@@ -165,9 +213,9 @@
   SWFMovie_nextFrame(mo);  // frame 5
 
   
-  add_actions(mo, "if(! haslooped) {"
+  add_actions(mo, "if(! haslooped1) {"
                   "   gotoAndPlay(5);"
-                  "   haslooped = true;"
+                  "   haslooped1 = true;"
                   "}" );
   SWFMovie_nextFrame(mo);  // frame 6
   
@@ -180,9 +228,74 @@
   check_equals(mo, "mc3Unloaded", "0");
   
   xcheck_equals(mo, "asOrder", "'0+1+2+3+4+5+1+2+3+5+'");
-  add_actions(mo, "totals(); stop();");
   SWFMovie_nextFrame(mo);  // frame 7
    
+  //
+  // ==case 2==
+  //
+  mc4 = newSWFMovieClip();
+    mc41 = newSWFMovieClip(); 
+    SWFMovieClip_nextFrame(mc41);
+    
+    it41 = SWFMovieClip_add(mc4, (SWFBlock)mc41); 
+    add_clip_actions(mc4, 
+        "_root.check_equals(this._target, '/instance3');"
+        "inst = this.getInstanceAtDepth(-16383);"
+        "if(! haslooped2) {"
+        "   haslooped2 = true;"
+        "   _root.check_equals(inst._target, '/instance3/instance4');"
+        "} else {"
+        "   _root.check_equals(inst._target, '/instance3/instance5');"
+        "   stop();"
+        "}"
+   );
+  SWFMovieClip_nextFrame(mc4);
+    SWFDisplayItem_remove(it41);
+  SWFMovieClip_nextFrame(mc4);  
+  
+  SWFMovie_add(mo, mc4);
+  SWFMovie_nextFrame(mo);  // frame 9
+  
+  SWFMovie_nextFrame(mo);  // frame 10
+  
+  //
+  // ==case 3==
+  //
+  mc5 = newSWFMovieClip();
+    mc51 = newSWFMovieClip(); 
+    SWFMovieClip_nextFrame(mc51);
+    
+    it51 = SWFMovieClip_add(mc5, (SWFBlock)mc51); 
+    add_clip_actions(mc5, 
+        "_root.check_equals(this._target, '/instance6');"
+        "inst = this.getInstanceAtDepth(-16383);"
+        "if(! haslooped3) {"
+        "   haslooped3 = true;"
+        "   _root.check_equals(inst._target, '/instance6/instance7');"
+        "} else {"
+        "   _root.check_equals(inst._target, '/instance6/instance7');"
+        "   stop();"
+        "}"
+   );
+  SWFMovieClip_nextFrame(mc5);
+  SWFMovieClip_nextFrame(mc5); 
+  
+  SWFMovie_add(mo, mc5);
+  SWFMovie_nextFrame(mo);  // frame 11
+  
+  SWFMovie_nextFrame(mo);  // frame 12
+  
+  SWFMovie_nextFrame(mo);  // frame 13
+  
+  mc5 = newSWFMovieClip();
+  add_clip_actions(mc5, "_root.check_equals(this._target, '/instance9');");
+  SWFMovieClip_nextFrame(mc5);
+  
+  SWFMovie_add(mo, mc5);
+  SWFMovie_nextFrame(mo);  // frame 14
+  
+  add_actions(mo, "totals(15); stop();");
+  SWFMovie_nextFrame(mo);  // frame 15
   //Output movie
   puts("Saving " OUTPUT_FILENAME );
   SWFMovie_save(mo, OUTPUT_FILENAME);

Index: testsuite/misc-swfc.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-swfc.all/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- testsuite/misc-swfc.all/Makefile.am 20 Nov 2007 06:43:13 -0000      1.16
+++ testsuite/misc-swfc.all/Makefile.am 4 Dec 2007 03:42:31 -0000       1.17
@@ -33,6 +33,7 @@
        edittext_test1.sc \
        opcode_guard_test2.sc \
        swf4opcode.sc \
+       mouse_drag_test.sc \
        $(NULL)
 
 # These will get compiled to SWFs just as above, but will not be executed as a 
test

Index: testsuite/misc-swfc.all/mouse_drag_test.sc
===================================================================
RCS file: testsuite/misc-swfc.all/mouse_drag_test.sc
diff -N testsuite/misc-swfc.all/mouse_drag_test.sc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-swfc.all/mouse_drag_test.sc  4 Dec 2007 03:42:31 -0000       
1.1
@@ -0,0 +1,84 @@
+/*
+ *   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 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
+ *
+ *  Test startDrag and endDrag
+ *
+ *  Expected behaviour:
+ *
+ *    static movieclips are immune to static transformation after startDrag.
+ */
+
+.flash  bbox=800x600 filename="mouse_drag_test.sc" background=white version=6 
fps=12
+
+.frame 1
+    .action:
+        #include "Dejagnu.sc"
+    .end
+
+.frame 2
+    .box b1 color=white fill=green width=50 height=50 
+    .sprite mc1
+        .put shape1=b1 x=100 y=100
+    .end
+    .put mc1
+    
+    .action:
+        // check the existence of mc1.shape1
+        check_equals(typeof(mc1.shape1), 'movieclip');
+        // the name of the shape is evaluated to its parent clip
+        check_equals(mc1.shape1, mc1);
+        mc1.startDrag(true);
+        check_equals(mc1._x, 0);
+        check_equals(mc1._y, 0);
+    .end
+
+.frame 3
+    .jump mc1 x=200 y=200 //MOVE
+    .action:
+        // static transformation does not work after startDrag
+        xcheck(mc1._x != 200);
+        xcheck(mc1._y != 200);
+        mc1.stopDrag();
+    .end
+
+.frame 4
+    .jump mc1 x=300 y=300
+    .action:
+        // static transformation does not work even after stopDrag
+        xcheck(mc1._x != 300);
+        xcheck(mc1._y != 300);
+    .end
+
+.frame 5
+    .action:
+        // enable dragging again, just for visual check.
+        mc1.startDrag(true, 200, 200, 300, 300);
+    .end
+    
+.frame 6
+    .action:
+        totals(8);
+        stop();
+    .end
+
+.end // end of the file
+
+




reply via email to

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