gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/testsuite/misc-swfc.all movieclip_destruc...


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite/misc-swfc.all movieclip_destruc...
Date: Mon, 03 Sep 2007 09:42:14 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/09/03 09:42:14

Modified files:
        testsuite/misc-swfc.all: movieclip_destruction_test1.sc 

Log message:
        more tests, all of the function body get executed, and this point is 
null.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/movieclip_destruction_test1.sc?cvsroot=gnash&r1=1.4&r2=1.5

Patches:
Index: movieclip_destruction_test1.sc
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-swfc.all/movieclip_destruction_test1.sc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- movieclip_destruction_test1.sc      31 Aug 2007 07:40:00 -0000      1.4
+++ movieclip_destruction_test1.sc      3 Sep 2007 09:42:14 -0000       1.5
@@ -35,7 +35,7 @@
  * Description:
  * 
  *  frame2: character mc1 placed at depth -16381.
- *          mc1 has two frams, _root.gotoAndStop(6) get executed in it's 2nd 
frame.
+ *          mc1 has two frams, _root.gotoAndPlay(6) get executed in it's 2nd 
frame.
  *  frame3: 
  *  frame4: remove character -16381 
  *  frame6: 
@@ -70,7 +70,7 @@
       .action:
         check_equals(mc1.getDepth(), -16383);
         _root.x = 0;
-        _root.gotoAndStop(6);
+        _root.gotoAndPlay(6);
         // AS below have no chance to be executed.
         // Since mc1 will get removed during gotoFrame above.
         _root.x = 100; 
@@ -119,8 +119,40 @@
 .frame 6 // target frame
   .action:
     xcheck_equals(_root.x, 0);
+  .end
+
+
+// seperate tests to see if the whole function body get executed?
+// yes in this case.
+.frame 8
+  .action:
+    _root.createEmptyMovieClip("mc4", 100);
+    
+    check_equals(typeof(_root.mc4), 'movieclip');
+    
+    mc4.func = function (clip)
+    {
+       _root.check_equals(this.valueOf(), mc4);
+      _root.testvar1 = 100;
+      clip.removeMovieClip(); 
+      _root.xcheck_equals(typeof(_root.mc4), 'undefined');
+      _root.xcheck_equals(typeof(this), 'movieclip');
+      _root.xcheck_equals(this.valueOf(), null);  // this pointer is null!
+      _root.testvar2 = 200;
+    };
+    
+    mc4.fun(mc4); // invoke the function and remove mc
+    
+    xcheck_equals(_root.testvar1, 100);
+    xcheck_equals(_root.testvar2, 200);
+    xcheck_equals(typeof(_root.mc4), 'undefined');
+    
+    _root.note(mc4);
+    
     stop();
+    totals();
   .end
   
+
 .end
 




reply via email to

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