Location unforgeable - Test Harness

A test harness from https://chromium.googlesource.com/chromium/blink/+/9e3f42021050f5e21203a439cf40332370e449b5/LayoutTests/fast/dom/Document/location-unforgeable.html

By
skeptic_fx 0 Seen 357 times
Tags
test-harness location unforgeable
Run this test now.

Results


Tested on
Chrome - 51 - Mac OS X
ResultTest NameMessage
PASSlocation is unforgeable

Tested on
Firefox - 44 - Ubuntu
ResultTest NameMessage
PASSlocation is unforgeable

Tested on
Googlebot - 2.1 - undefined
ResultTest NameMessage
FAILlocation is unforgeableassert_false: property is not configurable expected false got true

Tested on
IE - 11 - Windows 10
ResultTest NameMessage
FAILlocation is unforgeableassert_true: property exist on the object itself expected true got false

Tested on
Safari - 9 - Mac OS X
ResultTest NameMessage
PASSlocation is unforgeable

Tested on
Chrome Mobile - 41 - Android
ResultTest NameMessage
FAILlocation is unforgeableassert_false: property is not configurable expected false got true

Tested on
Opera - 47 - Windows 10
ResultTest NameMessage
PASSlocation is unforgeable

User Script (TESTHARNESS)

					
<html>
<head>
<script src="/public/js/testharness-domstorm.js"></script>


<script>
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");
}, "location is unforgeable");
</script>

</head>
<body>
Testing location unforgeable
</body>
</html>