diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /layout/mathml/tests/test_bug706406.html | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/mathml/tests/test_bug706406.html')
-rw-r--r-- | layout/mathml/tests/test_bug706406.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/layout/mathml/tests/test_bug706406.html b/layout/mathml/tests/test_bug706406.html new file mode 100644 index 0000000000..3bdd8e9fb4 --- /dev/null +++ b/layout/mathml/tests/test_bug706406.html @@ -0,0 +1,71 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=706406 +--> +<head> + <title>Test for Bug 706406</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"/> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=706406">Mozilla Bug 706406</a> +<p id="display"></p> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <maction actiontype="toggle" id="maction"> + <mn>1</mn> + <mn>2</mn> + </maction> +</math> +<pre id="test"> +<script type="application/javascript"> + +/** Test for Bug 706406 **/ + +function doTest() +{ + function doStopPropagation(aEvent) { + aEvent.stopPropagation(); + } + + var maction = document.getElementById("maction"); + + synthesizeMouseAtCenter(maction, {}); + + is(maction.getAttribute("selection"), "2", + "maction's selection attribute isn't 2 by first click"); + + synthesizeMouseAtCenter(maction, {}); + + is(maction.getAttribute("selection"), "1", + "maction's selection attribute isn't 1 by second click"); + + window.addEventListener("mousedown", doStopPropagation, true); + window.addEventListener("mouseup", doStopPropagation, true); + window.addEventListener("click", doStopPropagation, true); + + synthesizeMouseAtCenter(maction, {}); + + is(maction.getAttribute("selection"), "2", + "maction's selection attribute isn't 2 by first click called stopPropagation()"); + + synthesizeMouseAtCenter(maction, {}); + + is(maction.getAttribute("selection"), "1", + "maction's selection attribute isn't 1 by second click called stopPropagation()"); + + window.removeEventListener("mousedown", doStopPropagation, true); + window.removeEventListener("mouseup", doStopPropagation, true); + window.removeEventListener("click", doStopPropagation, true); + + SimpleTest.finish(); +} + +SimpleTest.waitForExplicitFinish(); +SimpleTest.waitForFocus(doTest); + +</script> +</pre> +</body> +</html> |