summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js')
-rw-r--r--testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js b/testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js
new file mode 100644
index 0000000000..1b2d68a462
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/the-window-object/window-open-defaults.window.js
@@ -0,0 +1,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");