gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/testsuite/actionscript.all setProperty.as


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite/actionscript.all setProperty.as
Date: Mon, 12 May 2008 03:36:09 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  08/05/12 03:36:09

Modified files:
        testsuite/actionscript.all: setProperty.as 

Log message:
        more tests to trigger SWF5 failures.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/setProperty.as?cvsroot=gnash&r1=1.5&r2=1.6

Patches:
Index: setProperty.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/setProperty.as,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- setProperty.as      9 May 2008 13:55:48 -0000       1.5
+++ setProperty.as      12 May 2008 03:36:08 -0000      1.6
@@ -19,7 +19,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: setProperty.as,v 1.5 2008/05/09 13:55:48 strk Exp $";
+rcsid="$Id: setProperty.as,v 1.6 2008/05/12 03:36:08 zoulunkai Exp $";
 #include "check.as"
 
 #ifdef MING_SUPPORTS_ASM
@@ -31,6 +31,7 @@
 createSprite("mc1", 10);
 
 mc1.func = function () {
+
        pass_check = _root.pass_check;
        xpass_check = _root.xpass_check;
        fail_check = _root.fail_check;
@@ -77,9 +78,55 @@
 #endif
 };
 mc1.func();
-
-check_totals(6); 
+// restore the _xscale of _root after test.
 _root._xscale = 100;
 
-#endif //MING_SUPPORTS_ASM
 
+//
+//  test removeMovieClip(""), opcode 37
+//
+createSprite("mc2", 20);
+mc2.remove = function () {
+    // in SWF6 and obove, it's no effect(probably results 
_root.removeMovieClip()).
+    // in SWF5, mc2.removeMovieClip().
+    removeMovieClip("");
+};
+mc2.remove();
+#if OUTPUT_VERSION == 5
+    xcheck_equals(typeof(mc2), 'undefined');
+#else
+    check_equals(typeof(mc2), 'movieclip');
+#endif
+
+
+//
+//  test setTarget(""), opcode 139 
+//
+createSprite("mc3", 30);
+_root.checkpoint = 0;
+_root.mc3thisPtr = 0;
+
+mc3.set_target = function() {
+    // for SWF6 and above, it's setTarget("_root");
+    // for SWF5, it's setTarget("mc3");
+    setTarget("");
+    _root.mc3thisPtr = this;
+    asm{
+        push '_root.checkpoint', '', 11         
+        getproperty  //_target         
+        setvariable             
+    };
+};
+mc3.set_target();
+
+check_equals(mc3thisPtr, mc3);
+
+#if OUTPUT_VERSION == 5
+    xcheck_equals(_root.checkpoint, "/mc3");
+#else
+    check_equals(_root.checkpoint, "/");
+#endif
+
+check_totals(9); 
+
+#endif //MING_SUPPORTS_ASM




reply via email to

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