Bug 1528709 [wpt PR 15391] - HTML: window.name, a=testonly
authorAnne van Kesteren <annevk@annevk.nl>
Tue, 05 Mar 2019 12:14:32 +0000
changeset 464544 9acf395a6242
parent 464543 cec99a4c0224
child 464545 3983aba2b0df
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1528709, 15391
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1528709 [wpt PR 15391] - HTML: window.name, a=testonly Automatic update from web-platform-tests HTML: window.name For https://github.com/whatwg/html/pull/4366. -- wpt-commits: 8e76fc76d3af0a56d0ccdd627fe844fd9c5a1554 wpt-pr: 15391
testing/web-platform/tests/html/browsers/the-window-object/name-attribute.window.js
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/the-window-object/name-attribute.window.js
@@ -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");