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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/context-menu-on-long-press.html

Issue 320453002: Update layout tests for touch text selection. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/context-menu-on-long-press-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../../resources/js-test.js"></script> 4 <script src="../../../../resources/js-test.js"></script>
5 <style>
6 #empty {
7 width: 100px;
8 height: 50px;
9 }
10 </style>
5 </head> 11 </head>
6 <body onload="test()"> 12 <body onload="test()">
7 <p>This test checks that the context menu is shown on long press gesture.</p> 13 <p>This test checks that the context menu is shown on long press gesture.</p>
8 <div id="text">Testing</div> 14 <div id="empty"></div>
9 <div id="result">FAIL</div> 15 <div id="result">FAIL</div>
10 <script> 16 <script>
11 function test() 17 function test()
12 { 18 {
13 if (window.testRunner) 19 if (window.testRunner)
14 testRunner.dumpAsText(); 20 testRunner.dumpAsText();
15 21
16 document.oncontextmenu = function() { document.getElementById("result").inne rHTML = "PASS"; } 22 document.oncontextmenu = function() { document.getElementById("result").inne rHTML = "PASS"; }
17 23
18 var text = document.getElementById("text"); 24 var empty = document.getElementById("empty");
19 25
20 var x = text.offsetParent.offsetLeft + text.offsetLeft + 4; 26 var x = empty.offsetParent.offsetLeft + empty.offsetLeft + 4;
21 var y = text.offsetParent.offsetTop + text.offsetTop + text.offsetHeight / 2 ; 27 var y = empty.offsetParent.offsetTop + empty.offsetTop + empty.offsetHeight / 2;
22 28
23 if (!window.eventSender) 29 if (!window.eventSender)
24 return; 30 return;
25 if (eventSender.gestureLongPress) { 31 if (eventSender.gestureLongPress) {
26 eventSender.gestureLongPress(x, y); 32 eventSender.gestureLongPress(x, y);
27 } else { 33 } else {
28 debug("gestureLongPress not implemented by this platform"); 34 debug("gestureLongPress not implemented by this platform");
29 return; 35 return;
30 } 36 }
31 } 37 }
32 </script> 38 </script>
33 </body> 39 </body>
34 </html> 40 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/context-menu-on-long-press-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698