gnash-commit
[Top][All Lists]
Advanced

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

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


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite/actionscript.all with.as
Date: Sat, 29 Sep 2007 09:34:03 +0000

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

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

Log message:
        more tests for 'this' in 'with' context.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/with.as?cvsroot=gnash&r1=1.15&r2=1.16

Patches:
Index: with.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/with.as,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- with.as     29 Sep 2007 03:27:57 -0000      1.15
+++ with.as     29 Sep 2007 09:34:03 -0000      1.16
@@ -21,7 +21,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: with.as,v 1.15 2007/09/29 03:27:57 zoulunkai Exp $";
+rcsid="$Id: with.as,v 1.16 2007/09/29 09:34:03 zoulunkai Exp $";
 
 #include "check.as"
 
@@ -224,6 +224,20 @@
        }
 }
 
+//
+//  test 'this' in 'with' context
+//
+objA = new Object();
+objB = new Object();
+objA.func = function () {
+   check_equals(this, objA);
+   with(_root.objB){
+    // 'with' won't change this context
+       check_equals(this, objA);
+   }
+};
+objA.func();
+
 
 // 
 // test ActionSetTarget and ActionSetTarget2 




reply via email to

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