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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/editor/text-editor-home-button.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 src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="editor-test.js"></script> 4 <script src="editor-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 function foo() 9 function foo()
10 { 10 {
11 return 42; 11 return 42;
12 } 12 }
13 var textEditor = InspectorTest.createTestEditor(); 13 var textEditor = InspectorTest.createTestEditor();
14 textEditor.setMimeType("text/javascript"); 14 textEditor.setMimeType("text/javascript");
15 textEditor.setReadOnly(false); 15 textEditor.setReadOnly(false);
16 textEditor.element.focus(); 16 textEditor.element.focus();
17 17
18 textEditor.setText(foo.toString()); 18 textEditor.setText(foo.toString());
19 19
20 InspectorTest.addResult(textEditor.text()); 20 InspectorTest.addResult(textEditor.text());
21 21
22 function homeButton(shift, callback) 22 function homeButton(shift, callback)
23 { 23 {
24 var key = WebInspector.isMac() ? "leftArrow" : "home"; 24 var key = WebInspector.isMac() ? "ArrowLeft" : "Home";
25 var modifiers = WebInspector.isMac() ? ["metaKey"] : []; 25 var modifiers = WebInspector.isMac() ? ["metaKey"] : [];
26 if (shift) 26 if (shift)
27 modifiers.push("shiftKey"); 27 modifiers.push("shiftKey");
28 InspectorTest.fakeKeyEvent(textEditor, key, modifiers, callback); 28 InspectorTest.fakeKeyEvent(textEditor, key, modifiers, callback);
29 } 29 }
30 30
31 function hitHomeButton(shift, times, callback) 31 function hitHomeButton(shift, times, callback)
32 { 32 {
33 function hitButtonCallback() 33 function hitButtonCallback()
34 { 34 {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 </head> 98 </head>
99 99
100 <body onload="runTest();"> 100 <body onload="runTest();">
101 <p> 101 <p>
102 This test verifies that home button triggers selection between first symbol of t he line 102 This test verifies that home button triggers selection between first symbol of t he line
103 and first non-blank symbol of the line. 103 and first non-blank symbol of the line.
104 </p> 104 </p>
105 105
106 </body> 106 </body>
107 </html> 107 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698