Bug 1776680 [wpt PR 34603] - [@container] Test invalidation of font-relative units...
[gecko.git] / dom / events / test / window_bug659071.html
blobd2cf1c9ef2ce237a991a3380012155c8f44249c5
1 <!DOCTYPE HTML>
2 <html>
3 <head>
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"/>
8 </head>
9 <body>
10 <video id="v" controls></video>
11 <script type="application/javascript">
13 SimpleTest.waitForFocus(startTests, window);
14 SimpleTest.requestFlakyTimeout("untriaged");
16 function is()
18 window.opener.is.apply(window.opener, arguments);
21 function isnot()
23 window.opener.isnot.apply(window.opener, arguments);
26 function hitEventLoop(aFunc, aTimes)
28 if (--aTimes) {
29 setTimeout(hitEventLoop, 0, aFunc, aTimes);
30 } else {
31 setTimeout(aFunc, 20);
35 function startTests() {
36 SpecialPowers.pushPrefEnv({"set": [["mousewheel.with_control.action", 3]]}, runTests);
39 function 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);
62 }, 20);
63 }, 20);
64 }, 20);
67 </script>
68 </body>
69 </html>