summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/the-window-object/name-attribute.window.js
blob: f266dd7acb96cc473129c066e59f027c2eb067f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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");