Skip to content

Commit

Permalink
Bug 1528709 [wpt PR 15391] - HTML: window.name, a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
HTML: window.name

For whatwg/html#4366.
--

wpt-commits: 8e76fc76d3af0a56d0ccdd627fe844fd9c5a1554
wpt-pr: 15391
  • Loading branch information
annevk authored and jgraham committed Mar 16, 2019
1 parent c9b3baf commit 17854d8
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
test(() => {
const frame = document.createElement("iframe"),
name = "A",
name2 = "B";
frame.setAttribute("name", name);
document.body.append(frame);
const frameW = frame.contentWindow;
assert_equals(frameW.name, name);
frameW.name = name2;
assert_equals(frame.getAttribute("name"), name);
assert_equals(frameW.name, name2);
frame.remove();
assert_equals(frame.getAttribute("name"), name);
assert_equals(frameW.name, "");
frameW.name = name2;
assert_equals(frame.getAttribute("name"), name);
assert_equals(frameW.name, "");
}, "Window object's name IDL attribute");

0 comments on commit 17854d8

Please sign in to comment.