diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/events/test/window_bug659071.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/events/test/window_bug659071.html')
-rw-r--r-- | dom/events/test/window_bug659071.html | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/dom/events/test/window_bug659071.html b/dom/events/test/window_bug659071.html new file mode 100644 index 000000000..5fb2efed4 --- /dev/null +++ b/dom/events/test/window_bug659071.html @@ -0,0 +1,69 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>Test for Bug 659071</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<video id="v" controls></video> +<script type="application/javascript"> + +SimpleTest.waitForFocus(startTests, window); +SimpleTest.requestFlakyTimeout("untriaged"); + +function is() +{ + window.opener.is.apply(window.opener, arguments); +} + +function isnot() +{ + window.opener.isnot.apply(window.opener, arguments); +} + +function hitEventLoop(aFunc, aTimes) +{ + if (--aTimes) { + setTimeout(hitEventLoop, 0, aFunc, aTimes); + } else { + setTimeout(aFunc, 20); + } +} + +function startTests() { + SpecialPowers.pushPrefEnv({"set": [["mousewheel.with_control.action", 3]]}, runTests); +} + +function runTests() +{ + synthesizeKey("0", { accelKey: true }); + + var video = document.getElementById("v"); + hitEventLoop(function () { + is(SpecialPowers.getFullZoom(window), 1.0, + "failed to reset zoom"); + synthesizeWheel(video, 10, 10, + { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true, + deltaX: 0, deltaY: 1.0, lineOrPageDeltaX: 0, lineOrPageDeltaY: 1 }); + hitEventLoop(function () { + isnot(SpecialPowers.getFullZoom(window), 1.0, + "failed to zoom by ctrl+wheel"); + + synthesizeWheel(video, 10, 10, + { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true, + deltaX: 0, deltaY: 1.0, lineOrPageDeltaX: 0, lineOrPageDeltaY: -1 }); + hitEventLoop(function () { + is(SpecialPowers.getFullZoom(window), 1.0, + "failed to reset zoom"); + + hitEventLoop(window.opener.finish, 20); + }, 20); + }, 20); + }, 20); +} + +</script> +</body> +</html> |