summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js
blob: 1b2d68a4626ef984025587e16a4dbe61c6069145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
async_test(t => {
  const frame = document.createElement("iframe");
  t.add_cleanup(() => frame.remove());
  frame.name = "foo";
  frame.src = "/common/blank.html";
  frame.onload = t.step_func(() => {
    frame.onload = t.unreached_func();
    t.step_timeout(() => t.done(), 500);
    assert_equals(window[0], window.open(undefined, "foo"));
  });
  document.body.append(frame);
}, "window.open()'s url parameter default");