summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-location-interface/location-prototype-setting.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-location-interface/location-prototype-setting.html')
-rw-r--r--testing/web-platform/tests/html/browsers/history/the-location-interface/location-prototype-setting.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/location-prototype-setting.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/location-prototype-setting.html
new file mode 100644
index 000000000..726aaea23
--- /dev/null
+++ b/testing/web-platform/tests/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>