1 <!-- based on clientXY-in-zoom-and-scroll.html -->
2 <script src="../js/resources/js-test-pre.js"></script>
4 function clickHandler(e)
8 var elem = document.getElementById('gizmo');
9 elem.textContent = "client(" + e.clientX + "," + e.clientY + ") page(" + e.pageX + "," + e.pageY + ")";
13 <div id="console"></div>
15 <div id="gizmo" style="position: absolute; left: 0px; top: 0px; overflow-x: hidden; overflow-y: hidden; width: 100%; height: 100%; text-align: middle;" onDblClick="clickHandler(event)">Double-click on this page.</div>
21 function sendDblClick()
23 if (window.eventSender) {
24 eventSender.leapForward(1000); // drain dblclick timer
25 eventSender.mouseMoveTo(200, 100); // x and y different for safety
26 eventSender.mouseDown();
27 eventSender.mouseUp();
28 eventSender.mouseDown();
29 eventSender.mouseUp();
34 if (window.eventSender) {
35 eventSender.zoomPageIn();
39 function zoomPageOut()
41 if (window.eventSender) {
42 eventSender.zoomPageOut();
46 if (window.testRunner) {
47 testRunner.dumpAsText();
48 testRunner.waitUntilDone();
56 shouldBe("event.clientX", "166");
57 shouldBe("event.clientY", "83");
58 shouldBe("event.pageX", "166");
59 shouldBe("event.pageY", "83");
61 window.addEventListener("dblclick", zoomed, false);
65 window.removeEventListener("dblclick", zoomed, false);
67 if (window.testRunner) {
68 var area = document.getElementById('testArea');
69 area.parentNode.removeChild(area);
71 testRunner.notifyDone();
74 <script src="../js/resources/js-test-post.js"></script>