Index: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-prototype-setting.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-prototype-setting.html b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-prototype-setting.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..726aaea23ab4116dd88e6e5192bbc3f4029bd228 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-prototype-setting.html |
@@ -0,0 +1,18 @@ |
+<!doctype html> |
+<meta charset=utf-8> |
+<title>[[SetPrototypeOf]] on a location object should return false</title> |
+<script src=/resources/testharness.js></script> |
+<script src=/resources/testharnessreport.js></script> |
+<script> |
+ test(function() { |
+ var origProto = Object.getPrototypeOf(location); |
+ assert_throws(new TypeError, function() { |
+ Object.setPrototypeOf(location, {}); |
+ }); |
+ assert_throws(new TypeError, function() { |
+ location.__proto__ = {}; |
+ }); |
+ assert_false(Reflect.setPrototypeOf(location, {})); |
+ assert_equals(Object.getPrototypeOf(location), origProto); |
+ }); |
+</script> |