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/html/test/test_bug372098.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/html/test/test_bug372098.html')
-rw-r--r-- | dom/html/test/test_bug372098.html | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/dom/html/test/test_bug372098.html b/dom/html/test/test_bug372098.html new file mode 100644 index 0000000000..900b20100d --- /dev/null +++ b/dom/html/test/test_bug372098.html @@ -0,0 +1,68 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=372098 +--> +<head> + <title>Test for Bug 372098</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <script src="/tests/SimpleTest/EventUtils.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> + <base target="bug372098"></base> +</head> +<body> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=372098">Mozilla Bug 372098</a> + <p id="display"></p> + <div id="content" style="display:none;"> + <iframe name="bug372098"></iframe> + <a id="a" href="bug372098-link-target.html?a" target="">link</a> + <map> + <area id="area" shape="default" href="bug372098-link-target.html?area" target=""/> + </map> + </div> + <pre id="test"> + <script class="testbody" type="text/javascript"> + +var a_passed = false; +var area_passed = false; + +/* Start the test */ + +SimpleTest.waitForExplicitFinish(); +addLoadEvent(handle_load); + +function handle_load() +{ + sendMouseEvent({type:'click'}, 'a'); +} + +/* Finish the test */ + +function finish_test() +{ + ok(a_passed, "The 'a' element used the correct target."); + ok(area_passed, "The 'area' element used the correct target."); + SimpleTest.finish(); +} + +/* Callback function used by the linked document */ + +function callback(tag) +{ + switch (tag) { + case 'a': + a_passed = true; + sendMouseEvent({type:'click'}, 'area'); + return; + case 'area': + area_passed = true; + finish_test(); + return; + } + throw new Error("Eh??? We only test the 'a', 'link' and 'area' elements."); +} + + </script> + </pre> + +</body> +</html> |