[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: tests/khtmltests/regression/tests/js
From: Harri Porten <porten () kde ! org>
Date: 2008-11-09 14:19:36
Message-ID: 1226240376.974558.2079.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 881990 by porten:
Flags of Function prototype constructor
M +15 -0 function.js
--- trunk/tests/khtmltests/regression/tests/js/function.js #881989:881990
@@ -244,3 +244,18 @@
};
};
shouldBe("fh(5)(2)", "3");
+
+// test flags of function prototype's constructor property
+// inspired by an Acid3 test
+var funcToModify1 = function () { 1 };
+funcToModify1.prototype.constructor = "altCtor1";
+shouldBe("funcToModify1.prototype.constructor", "'altCtor1'");
+delete funcToModify1.prototype.constructor;
+shouldBe("funcToModify1.prototype.constructor", "Object.prototype.constructor");
+function funcToModify2() { 1 };
+funcToModify2.prototype.constructor = "altCtor2";
+shouldBe("funcToModify2.prototype.constructor", "'altCtor2'");
+delete funcToModify2.prototype.constructor;
+shouldBe("funcToModify2.prototype.constructor", "Object.prototype.constructor");
+
+debug("Done");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic