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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/shrink-selection-after-shift-pagedown.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function runTest() 4 function runTest()
5 { 5 {
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 8
9 var ta = document.getElementById('ta'); 9 var ta = document.getElementById('ta');
10 ta.focus(); 10 ta.focus();
11 ta.setSelectionRange(4, 16); 11 ta.setSelectionRange(4, 16);
12 12
13 var lastSelectedLine; 13 var lastSelectedLine;
14 if (window.eventSender) { 14 if (window.eventSender) {
15 eventSender.keyDown("pageDown",["shiftKey"]); 15 eventSender.keyDown("PageDown",["shiftKey"]);
16 lastSelectedLine = (ta.value).substring(ta.selectionEnd - 4, ta.sele ctionEnd); 16 lastSelectedLine = (ta.value).substring(ta.selectionEnd - 4, ta.sele ctionEnd);
17 eventSender.keyDown("upArrow",["shiftKey"]); 17 eventSender.keyDown("ArrowUp",["shiftKey"]);
18 } 18 }
19 19
20 var result; 20 var result;
21 var selectedText = (ta.value).substring(ta.selectionStart, ta.selectionE nd); 21 var selectedText = (ta.value).substring(ta.selectionStart, ta.selectionE nd);
22 if ((selectedText.indexOf(lastSelectedLine) == -1) && (selectedText.inde xOf('L01') == -1)) 22 if ((selectedText.indexOf(lastSelectedLine) == -1) && (selectedText.inde xOf('L01') == -1))
23 result = "SUCCESS: The selection shrunk correctly"; 23 result = "SUCCESS: The selection shrunk correctly";
24 else 24 else
25 result = "SUCCESS: The selected text is \"" + selectedText + "\"."; 25 result = "SUCCESS: The selected text is \"" + selectedText + "\".";
26 document.getElementById("result").firstChild.data = result; 26 document.getElementById("result").firstChild.data = result;
27 } 27 }
(...skipping 20 matching lines...) Expand all
48 L10 48 L10
49 L11 49 L11
50 L12 50 L12
51 L13 51 L13
52 L14 52 L14
53 L15 53 L15
54 L16 54 L16
55 </textarea> 55 </textarea>
56 <p id="result">TEST HAS NOT RUN</p> 56 <p id="result">TEST HAS NOT RUN</p>
57 </body> 57 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698