4 <title>Test for Bug
659071</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
7 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <video id=
"v" controls
></video>
11 <script type=
"application/javascript">
13 SimpleTest.waitForFocus(startTests, window);
14 SimpleTest.requestFlakyTimeout(
"untriaged");
18 window.opener.is.apply(window.opener, arguments);
23 window.opener.isnot.apply(window.opener, arguments);
26 function hitEventLoop(aFunc, aTimes)
29 setTimeout(hitEventLoop,
0, aFunc, aTimes);
31 setTimeout(aFunc,
20);
35 function startTests() {
36 SpecialPowers.pushPrefEnv({
"set": [[
"mousewheel.with_control.action",
3]]}, runTests);
41 synthesizeKey(
"0", { accelKey: true });
43 var video = document.getElementById(
"v");
44 hitEventLoop(function () {
45 is(SpecialPowers.getFullZoom(window),
1.0,
46 "failed to reset zoom");
47 synthesizeWheel(video,
10,
10,
48 { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true,
49 deltaX:
0, deltaY:
1.0, lineOrPageDeltaX:
0, lineOrPageDeltaY:
1 });
50 hitEventLoop(function () {
51 isnot(SpecialPowers.getFullZoom(window),
1.0,
52 "failed to zoom by ctrl+wheel");
54 synthesizeWheel(video,
10,
10,
55 { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true,
56 deltaX:
0, deltaY:
1.0, lineOrPageDeltaX:
0, lineOrPageDeltaY: -
1 });
57 hitEventLoop(function () {
58 is(SpecialPowers.getFullZoom(window),
1.0,
59 "failed to reset zoom");
61 hitEventLoop(window.opener.finish,
20);