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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/selectstart-by-arrow-keys.html

Issue 1778683005: Drop remaining [LegacyInterfaceTypeChecking] for Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 4 years, 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <p>This test ensures selectstart is fired when selection is created by arrow key s.</p> 4 <p>This test ensures selectstart is fired when selection is created by arrow key s.</p>
5 If running this test manually, click on div ("Hello World") element and try to s elect the text using arrow keys.<br> 5 If running this test manually, click on div ("Hello World") element and try to s elect the text using arrow keys.<br>
6 Expected result : SelectStart event will fire when user starts extending selecti on.<br> 6 Expected result : SelectStart event will fire when user starts extending selecti on.<br>
7 <div id="test" contenteditable>Hello World</div> 7 <div id="test" contenteditable>Hello World</div>
8 <script> 8 <script>
9 9
10 var selectStartCount = 0; 10 var selectStartCount = 0;
(...skipping 21 matching lines...) Expand all
32 logResult('Check (End + Shift)', 1); 32 logResult('Check (End + Shift)', 1);
33 33
34 eventSender.keyDown("home", ["shiftKey"]); 34 eventSender.keyDown("home", ["shiftKey"]);
35 logResult('Check (Home + Shift)', 1); 35 logResult('Check (Home + Shift)', 1);
36 36
37 eventSender.keyDown("end", ["shiftKey"]); 37 eventSender.keyDown("end", ["shiftKey"]);
38 logResult('Check (End + Shift)', 1); 38 logResult('Check (End + Shift)', 1);
39 39
40 // On Mac, home/end doesn't move caret so manually select " World". 40 // On Mac, home/end doesn't move caret so manually select " World".
41 if (navigator.platform.indexOf('Mac') == 0) 41 if (navigator.platform.indexOf('Mac') == 0)
42 window.getSelection().setBaseAndExtent(div.firstChild, div.textContent.i ndexOf('World'), div.textContent.length); 42 window.getSelection().setBaseAndExtent(div.firstChild, div.textContent.i ndexOf('World'), div.firstChild, div.textContent.length);
43 43
44 eventSender.keyDown("leftArrow"); 44 eventSender.keyDown("leftArrow");
45 logResult('Check (Left arrow)', 1); 45 logResult('Check (Left arrow)', 1);
46 46
47 if (navigator.platform.indexOf('Mac') == 0) 47 if (navigator.platform.indexOf('Mac') == 0)
48 eventSender.keyDown("leftArrow", ["shiftKey"], ["altKey"]); 48 eventSender.keyDown("leftArrow", ["shiftKey"], ["altKey"]);
49 else 49 else
50 eventSender.keyDown("leftArrow", ["shiftKey"], ["ctrlKey"]); 50 eventSender.keyDown("leftArrow", ["shiftKey"], ["ctrlKey"]);
51 logResult('Check (LeftArrow + Shift + Control)', 2); 51 logResult('Check (LeftArrow + Shift + Control)', 2);
52 52
(...skipping 13 matching lines...) Expand all
66 document.write(title + ': '); 66 document.write(title + ': ');
67 if (selectStartCount != expectedCount) 67 if (selectStartCount != expectedCount)
68 document.write('FAIL - expected ' + expectedCount + ' events but got ' + selectStartCount + ' events'); 68 document.write('FAIL - expected ' + expectedCount + ' events but got ' + selectStartCount + ' events');
69 else 69 else
70 document.write('PASS'); 70 document.write('PASS');
71 document.write('<br>'); 71 document.write('<br>');
72 } 72 }
73 </script> 73 </script>
74 </body> 74 </body>
75 </html> 75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698