Skip to content

Commit

Permalink
Merge pull request #96 from Ms2ger/window-named-getter-null
Browse files Browse the repository at this point in the history
Add a test for null characters in the name of an iframe.
  • Loading branch information
Hallvord R. M. Steen committed Apr 23, 2013
2 parents dc1cb59 + ea2227f commit 93363c6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion html/browsers/the-window-object/MANIFEST
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dir named-access-on-the-window-object
window-indexed-properties.html
window-indexed-properties-strict.html
window-named-properties.html
window-properties.html
window-prototype-chain.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
window-constructor.html
window-location.html
window-named-properties.html
window-npo-setter.html
window-null-names.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!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="http://www.whatwg.org/html/#window">
<link rel="help" href="http://www.whatwg.org/html/#dom-window-nameditem">
<link rel="help" href="http://dev.w3.org/2006/webapi/WebIDL/#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>

0 comments on commit 93363c6

Please sign in to comment.