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 soft_reference_te...


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite/misc-swfc.all soft_reference_te...
Date: Wed, 29 Aug 2007 10:43:50 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/08/29 10:43:50

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

Log message:
        more tests, need review later, seems lots of confict testing results.

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

Patches:
Index: soft_reference_test1.sc
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-swfc.all/soft_reference_test1.sc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- soft_reference_test1.sc     29 Aug 2007 09:45:22 -0000      1.4
+++ soft_reference_test1.sc     29 Aug 2007 10:43:49 -0000      1.5
@@ -28,7 +28,7 @@
  */
 
 
-.flash  bbox=200x200 filename="soft_reference_test1.swf" version=6 fps=12
+.flash  bbox=800x600 filename="soft_reference_test1.swf" background=white 
version=6 fps=12
 
 .frame 1
   .action:
@@ -91,7 +91,65 @@
     check(typeof(mcRef)=='movieclip'); 
     check(mcRef.valueOf() == null); 
     
-    totals();
+    // Release resources after testing
+    delete mc;
+    delete mcRef;
+    changed_again.removeMovieClip();
+  .end
+
+
+// seperate tests in frame9
+.frame 9
+  .action:
+    _root.createEmptyMovieClip("mc1", 30);
+    mc1._name = "mc2";
+    mcRef = mc2;
+    
+    check(typeof(mcRef)=='movieclip');
+    check_equals(mcRef.getDepth(), 30);
+    check(mcRef == _level0.mc2);
+    
+    mc2.removeMovieClip();
+    _root.createEmptyMovieClip("mc2", 40);
+
+    check(typeof(mcRef)=='movieclip');
+    xcheck(mcRef.valueOf() == null) 
+    
+    // release resources after testing
+    delete mcRef;
+    mc2.removeMovieClip();
+  .end
+
+// seperate tests in frame11
+.frame 11
+  .action:
+    mcContainer = new Array(10);
+    i = 0;
+    MovieClip.prototype.onConstruct = function ()
+    {
+      mcContainer[i++] = this;
+      note("Constructed "+this+" in depth "+this.getDepth()+" and assigned to 
mcContainer["+(i-1)+"]");
+    };
+    _root.createEmptyMovieClip("mc1", 50);
+    _root.createEmptyMovieClip("mc1", 51);
+    check_equals(mcContainer[0].getDepth(), 50);
+    check_equals(mcContainer[1].getDepth(), 51);
+    check_equals(mc1.getDepth(), 50);
+    
+    mc1._name = "mc2";
+    mcRef = mc2;
+    
+    check(typeof(mcRef)=='movieclip');
+    check_equals(mcRef.getDepth(), 50);
+    check(mcRef == _level0.mc2);
+    
+    mc2.removeMovieClip();
+    _root.createEmptyMovieClip("mc2", 60);
+
+    check(typeof(mcRef)=='movieclip');
+    xcheck(mcRef == _level0.mc1);
+    
+    _root.totals();
     stop();
   .end
   




reply via email to

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