chromium/third_party/blink/web_tests/fast/dom/Document/location-unforgeable.html

<!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_js(TypeError, function() {
        Object.defineProperty(document, "location", {get: function () {}});
    }, "attempting to modify property throws TypeError");
});
</script>