summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-location-interface/location-stringifier.html
blob: bde54b26662c46237ce2e5376f9a88e0f55e0991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<title>Location stringifier</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://heycam.github.io/webidl/#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>