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 525160 2eb522ceb6e1c842c8c5b2950d4a4ab2ef88268c
parent 525159 822ff0ac5f39581494eece446f71586dc003d7cb
child 525161 be42c83c6e9797698bac9eb972158fde092dbc18
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [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");