[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:       2010-05-02 16:25:38
Message-ID: 20100502162538.D55B7AC8AB () svn ! kde ! org
[Download RAW message or body]

SVN commit 1121890 by orlovich:

one more test.


 M  +15 -0     function.js  


--- trunk/tests/khtmltests/regression/tests/js/function.js #1121889:1121890
@@ -259,3 +259,18 @@
 shouldBe("funcToModify2.prototype.constructor", "Object.prototype.constructor");
 
 debug("Done");
+
+// .call
+
+var testThis = {};
+
+function callTest(a, b) {
+	_saveThis = this;
+	_saveA    = a;
+	_saveB    = b;
+	shouldBe("_saveThis", "testThis");
+	shouldBe("_saveA", 1);
+	shouldBe("_saveB", 42);
+}
+
+callTest.call(testThis, 1, 42);
[prev in list] [next in list] [prev in thread] [next in thread] 

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