2 <title>Document has an unforgeable attribute location
</title>
3 <script src=
"../../../resources/testharness.js"></script>
4 <script src=
"../../../resources/testharnessreport.js"></script>
6 // https://html.spec.whatwg.org/#document
7 // https://heycam.github.io/webidl/#Unforgeable
9 assert_true(document
.hasOwnProperty("location"), "property exist on the object itself");
10 var descriptor
= Object
.getOwnPropertyDescriptor(document
, "location");
11 assert_false(descriptor
.configurable
, "property is not configurable");
12 assert_throws(new TypeError(), function() {
13 Object
.defineProperty(document
, "location", {get: function () {}});
14 }, "attempting to modify property throws TypeError");