| Index: LayoutTests/fast/dom/Document/location-unforgeable.html
|
| diff --git a/LayoutTests/fast/dom/Document/location-unforgeable.html b/LayoutTests/fast/dom/Document/location-unforgeable.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ac764ac582e792eb5b06e2801a0a54cf7d38ac94
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/Document/location-unforgeable.html
|
| @@ -0,0 +1,16 @@
|
| +<!DOCTYPE html>
|
| +<title>Document has an unforgeable attribute location</title>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +// https://html.spec.whatwg.org/#document
|
| +// https://heycam.github.io/webidl/#Unforgeable
|
| +test(function() {
|
| + assert_true(document.hasOwnProperty("location"), "property exist on the object itself");
|
| + var descriptor = Object.getOwnPropertyDescriptor(document, "location");
|
| + assert_false(descriptor.configurable, "property is not configurable");
|
| + assert_throws(new TypeError(), function() {
|
| + Object.defineProperty(document, "location", {get: function () {}});
|
| + }, "attempting to modify property throws TypeError");
|
| +});
|
| +</script>
|
|
|