testing/web-platform/tests/html/browsers/the-window-object/named-access-on-the-window-object/window-null-names.html
author Mathew Hodson <mathew.hodson@gmail.com>
Mon, 26 Sep 2022 13:58:49 +0000
changeset 636432 43369097d907c6e3f5f12238b2ce47cfb37f12b9
parent 595768 a08bc80af6fa580a19598a51f3ce580cc535e4ac
permissions -rw-r--r--
Bug 1776578 - Make no-addtask-setup eslint rule check for init tasks. r=mossop Differential Revision: https://phabricator.services.mozilla.com/D150333

<!doctype html>
<meta charset=utf-8>
<title>Named access with null characters</title>
<link rel="author" title="Ms2ger" href="ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#window">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-nameditem">
<link rel="help" href="https://webidl.spec.whatwg.org/#named-properties-object">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
test(function() {
  var iframe = document.createElement("iframe")
  iframe.name = "a\0b"
  document.body.appendChild(iframe)
  assert_equals(window["a\0b"], iframe.contentWindow)
  assert_equals(window["ab"], undefined)
  assert_equals(window["a"], undefined)
});
</script>