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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-paragraph-end.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 </style>
5 <p id=target>Tap to the<br><span id=span>right:</span></p>
6 <div id=console></div>
7 <script>
8 var event;
9 function eventLogger(e) {
10 debug("Received " + e.type + " on " + (e.target.id || e.target.nodeName));
11 event = e;
12 shouldBeEqualToString("event.target.id", "target");
13 shouldBeEqualToString("document.elementFromPoint(event.clientX, event.client Y).id", "target");
14 }
15
16 description("Verifies that tapping in the whitespace at the end of a paragraph s ends mouse events properly to the paragraph node (even though there are no text line boxes here). http://crbug.com/398205");
17
18 // Tap at the far right edge of a paragraph.
19 var rect = target.getBoundingClientRect();
20 var point = {
21 x: rect.right - 50,
22 y: rect.bottom - 5
23 };
24
25 // This should be inside the paragraph but outside the span
26 shouldBeGreaterThan("point.x", "span.getBoundingClientRect().right");
27 shouldBeEqualToString("document.elementFromPoint(point.x, point.y).id", "target" );
28
29 document.addEventListener('mousemove', eventLogger);
30 document.addEventListener('mousedown', eventLogger);
31 document.addEventListener('mouseup', eventLogger);
32 document.addEventListener('click', eventLogger);
33
34 if (window.eventSender) {
35 debug("Sending GestureTapDown");
36 eventSender.gestureTapDown(point.x, point.y, 30, 30);
37
38 debug("Sending GestureShowPress");
39 eventSender.gestureShowPress(point.x, point.y, 30, 30);
40
41 debug("Sending GestureTap");
42 eventSender.gestureTap(point.x, point.y, 1, 30, 30);
43 } else {
44 debug("This test requires eventSender");
45 }
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698