summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/the-window-object/named-access-on-the-window-object/strict-mode-redefine-readonly-property.html
blob: ce1da3747a4e564d9b6dabfe0831c101faf26543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<link rel="help" href="https://crbug.com/1448846">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(() => {
  "use strict";
  const pathname = document.location.pathname;
  const form = document.createElement('form');
  form.name = 'location';
  document.body.appendChild(form);
  assert_equals(document.location?.pathname, pathname);
  form.remove();
}, "Adding/removing form with a name referring to a non-configurable property");
</script>
</body>