Index: LayoutTests/fast/dom/Window/Location/location-override-valueOf.html |
diff --git a/LayoutTests/fast/dom/Window/Location/location-override-valueOf.html b/LayoutTests/fast/dom/Window/Location/location-override-valueOf.html |
index 2ec9888beb74138a47bd73882aadcd7969e7fd11..2d28c2e80dd0f8473c574ed47cbc7e95b31fab16 100644 |
--- a/LayoutTests/fast/dom/Window/Location/location-override-valueOf.html |
+++ b/LayoutTests/fast/dom/Window/Location/location-override-valueOf.html |
@@ -10,6 +10,12 @@ |
var result = normalizeURL(String(window.location)); |
var correctValue = normalizeURL(document.URL); |
shouldBe("result", "correctValue"); |
+ result = normalizeURL(String(window.location.valueOf())); |
+ shouldBe("result", "correctValue"); |
+ shouldThrow("(function() { 'use strict'; location.valueOf = 'haxored'; return location.valueOf(); }())"); |
+ shouldNotThrow("(function() { location.valueOf = 'haxored'; return location.valueOf(); }())"); |
+ shouldThrow("(function() { 'use strict'; delete location.valueOf; }())"); |
+ shouldBe("(function() { delete location.valueOf; return !!location.valueOf}())", "true"); |
</script> |
</body> |
</html> |