diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/base/test/test_window_focus_by_close_and_open.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/test/test_window_focus_by_close_and_open.html')
-rw-r--r-- | dom/base/test/test_window_focus_by_close_and_open.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dom/base/test/test_window_focus_by_close_and_open.html b/dom/base/test/test_window_focus_by_close_and_open.html new file mode 100644 index 0000000000..d9b833c26f --- /dev/null +++ b/dom/base/test/test_window_focus_by_close_and_open.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<title>test for window focus by window.close() and window.open()</title> +<script src="/tests/SimpleTest/SimpleTest.js"></script> +<link rel="stylesheet" href="/tests/SimpleTest/test.css"/> +<script> +SimpleTest.waitForExplicitFinish(); + +function start() { + var w = window.open("", "_blank"); + w.finished = function() { + ok(true, "1st new window had focus"); + w.close(); + w = window.open("", "_blank"); + w.finished = function() { + ok(true, "2nd new window had focus"); + w.close(); + SimpleTest.finish(); + }; + w.location = "file_window_focus_by_close_and_open.html"; + }; + w.location = "file_window_focus_by_close_and_open.html"; +} +</script> +</head> +<body onload="setTimeout(start)"> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1695135">Mozilla Bug 1695135</a> +<p id="display"></p> +<div id="content"></div> +<pre id="test"></pre> +</body> +</html> |