[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    tests/khtmltests/regression/tests/js
From:       Maks Orlovich <maksim () kde ! org>
Date:       2007-10-26 20:41:06
Message-ID: 1193431266.304899.31579.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 729747 by orlovich:

Testcase for the this object fix...


 M  +17 -0     function_arguments.js  


--- trunk/tests/khtmltests/regression/tests/js/function_arguments.js #729746:729747
@@ -89,3 +89,20 @@
 shouldBe("newarg1","2");
 shouldBe("newarg2","999");
 shouldBe("newx","888");
+
+
+// Make sure we pass the right 'this'..
+x = 1;
+
+function f1() {
+  function f2() {
+    v = this.x; // Can't use local stuff directly in eval
+    shouldBe("v", "1");
+  }
+
+  var x = 3;
+  f2();
+}
+
+f1();
+
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic