From kde-commits Sun May 02 16:25:38 2010 From: Maks Orlovich Date: Sun, 02 May 2010 16:25:38 +0000 To: kde-commits Subject: tests/khtmltests/regression/tests/js Message-Id: <20100502162538.D55B7AC8AB () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=127281731109435 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);