Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html

Issue 429793004: Re-add extra hit-tests on GestureTap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix patch Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../../../../resources/js-test.js"></script>
3 <style>
4 html, body {
5 margin: 0;
6 }
7 body {
8 height: 1000px;
9 }
10 #target {
11 width: 50px;
12 height: 50px;
13 }
14 </style>
15 <iframe frameborder=0 id="target" src="resources/event-delegator.html"></iframe>
16 <div id=console></div>
17 <script>
18 var event;
19 window.scrollTo(0, 3);
20 var rect = target.getBoundingClientRect();
21 var point = {
22 x: rect.left + rect.width / 2,
23 y: rect.top + rect.height / 2 - 3
24 };
25
26 var eventReceived = {};
27
28 function onEventInFrame(e) {
29 debug("Received " + e.type + " in child frame");
30 event = e;
31 eventReceived[e.type] = true;
32 shouldBe("event.screenX", "point.x");
33 shouldBe("event.screenY", "point.y");
34 shouldBe("event.clientX", "50 / 2");
35 shouldBe("event.clientY", "50 / 2 + 7");
36 }
37
38 description("Verifies that a tap occuring in a scrolled iframe has the correct c o-ordinates");
39
40 if (window.eventSender) {
41 jsTestIsAsync = true;
42 target.onload = function() {
43 target.contentWindow.scrollTo(0, 7);
44
45 debug("Sending GestureTapDown to " + point.x + "," + point.y);
46 eventSender.gestureTapDown(point.x, point.y);
47
48 debug("Sending GestureShowPress");
49 eventSender.gestureShowPress(point.x, point.y);
50
51 debug("Sending GestureTap");
52 eventSender.gestureTap(point.x, point.y);
53
54 shouldBeTrue("eventReceived.mousemove");
55 shouldBeTrue("eventReceived.mousedown");
56 shouldBeTrue("eventReceived.mouseup");
57 shouldBeTrue("eventReceived.click");
58 setTimeout(finishJSTest, 100);
59 }
60 } else {
61 debug("This test requires eventSender");
62 }
63 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698