Index: test/webkit/fast/js/object-prototype-properties.js |
diff --git a/test/webkit/add-recovery.js b/test/webkit/fast/js/object-prototype-properties.js |
similarity index 65% |
copy from test/webkit/add-recovery.js |
copy to test/webkit/fast/js/object-prototype-properties.js |
index d204ef17fca71024ec6c6a01bcaa5a305ee2bb0a..76b40e48f3a152afecb3f14d540052474ce9bca5 100644 |
--- a/test/webkit/add-recovery.js |
+++ b/test/webkit/fast/js/object-prototype-properties.js |
@@ -22,22 +22,16 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
-"This tests that speculation recovery of destructive additions on unboxed integers works." |
+'This is a test case for <a https://bugs.webkit.org/show_bug.cgi?id=64678">bug 64678</a>.' |
); |
-function destructiveAddForBoxedInteger(a,b,c) { |
- var a_ = a.x; |
- var d = a_ + b; |
- return c + d + b; |
-} |
+//ES 5.1 allows for Object.prototype.toString being called with undefined/null. |
+shouldBe("Object.prototype.toString.call(undefined)", '"[object Undefined]"'); |
+shouldBe("Object.prototype.toString.call(null)", '"[object Null]"'); |
-// warm-up foo to be integer |
-for (var i = 0; i < 100; ++i) { |
- destructiveAddForBoxedInteger({x:1}, 2, 3); |
-} |
- |
-shouldBe("destructiveAddForBoxedInteger({x:1}, 2, 4)", "9"); |
-shouldBe("destructiveAddForBoxedInteger({x:2147483647}, 2, 4)", "2147483655"); |
-shouldBe("destructiveAddForBoxedInteger({x:2}, 2147483647, 4)", "4294967300"); |
-shouldBe("destructiveAddForBoxedInteger({x:2147483647}, 2147483647, 4)", "6442450945"); |
-shouldBe("destructiveAddForBoxedInteger({x:1}, 2, 2147483647)", "2147483652"); |
+// These calls pass undefined as this value, and as such should throw in toObject. |
+shouldThrow("Object.prototype.toLocaleString.call(undefined)"); |
+shouldThrow("Object.prototype.valueOf.call(undefined)"); |
+shouldThrow("Object.prototype.hasOwnProperty.call(undefined, 'hasOwnProperty')"); |
+shouldThrow("Object.prototype.propertyIsEnumerable.call(undefined, 'propertyIsEnumerable')"); |
+shouldThrow("Object.prototype.isPrototypeOf.call(undefined, this)"); |