diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-location-interface/location-stringifier.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/history/the-location-interface/location-stringifier.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/location-stringifier.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/location-stringifier.html new file mode 100644 index 0000000000..48bad7af0e --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/location-stringifier.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<title>Location stringifier</title> +<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> +<link rel="help" href="https://webidl.spec.whatwg.org/#es-stringifier"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/common/stringifiers.js></script> +<div id=log></div> +<script> +test_stringifier_attribute(location, "href", true); + +test(function() { + const prop1 = Object.getOwnPropertyDescriptor(location, "toString"), + prop2 = Object.getOwnPropertyDescriptor(location, "href") + + assert_true(prop1.enumerable) + assert_false(prop1.writable) + assert_false(prop1.configurable) + + assert_true(prop2.enumerable) + assert_false(prop2.configurable) + assert_equals(typeof prop2.get, "function") +}) +</script> |