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 522441 9acf395a6242f447db603b86c78f32f722081cf9
parent 522440 cec99a4c022407f66cf57e2d5cb6987ea320adcb
child 522442 3983aba2b0dfdb45a329a35961a726e45aafdf0c
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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");