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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/editor/text-editor-auto-whitespace-removing.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 function codeSnippet() { 6 function codeSnippet() {
7 return document.getElementById("codeSnippet").textContent; 7 return document.getElementById("codeSnippet").textContent;
8 } 8 }
9 9
10 function test() { 10 function test() {
(...skipping 17 matching lines...) Expand all
28 InspectorTest.dumpTextWithSelection(textEditor, true); 28 InspectorTest.dumpTextWithSelection(textEditor, true);
29 next(); 29 next();
30 } 30 }
31 return innerDumpAndNext; 31 return innerDumpAndNext;
32 } 32 }
33 33
34 function doubleEnter(next) 34 function doubleEnter(next)
35 { 35 {
36 function onFirstEnter() 36 function onFirstEnter()
37 { 37 {
38 InspectorTest.fakeKeyEvent(textEditor, "enter", [], dumpAndNext(next )); 38 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], dumpAndNext(next ));
39 } 39 }
40 40
41 InspectorTest.fakeKeyEvent(textEditor, "enter", [], onFirstEnter); 41 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], onFirstEnter);
42 } 42 }
43 43
44 var testSuite = [ 44 var testSuite = [
45 function testCollapsedBlock(next) 45 function testCollapsedBlock(next)
46 { 46 {
47 textEditor.setText(codeSnippetText); 47 textEditor.setText(codeSnippetText);
48 InspectorTest.setLineSelections(textEditor, [ 48 InspectorTest.setLineSelections(textEditor, [
49 {line: 0, column: 12} 49 {line: 0, column: 12}
50 ]); 50 ]);
51 doubleEnter(next); 51 doubleEnter(next);
(...skipping 26 matching lines...) Expand all
78 ]); 78 ]);
79 doubleEnter(next); 79 doubleEnter(next);
80 }, 80 },
81 81
82 function testEditedAutoIndent(next) 82 function testEditedAutoIndent(next)
83 { 83 {
84 textEditor.setText(codeSnippetText); 84 textEditor.setText(codeSnippetText);
85 InspectorTest.setLineSelections(textEditor, [ 85 InspectorTest.setLineSelections(textEditor, [
86 {line: 1, column: 17} 86 {line: 1, column: 17}
87 ]); 87 ]);
88 InspectorTest.fakeKeyEvent(textEditor, "enter", [], onEnter); 88 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], onEnter);
89 89
90 function onEnter() 90 function onEnter()
91 { 91 {
92 InspectorTest.fakeKeyEvent(textEditor, "W", [], onEditedText); 92 InspectorTest.fakeKeyEvent(textEditor, "W", [], onEditedText);
93 } 93 }
94 94
95 function onEditedText() 95 function onEditedText()
96 { 96 {
97 InspectorTest.fakeKeyEvent(textEditor, "enter", [], dumpAndNext( next)); 97 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], dumpAndNext( next));
98 } 98 }
99 }, 99 },
100 ]; 100 ];
101 } 101 }
102 102
103 </script> 103 </script>
104 </head> 104 </head>
105 105
106 <body onload="runTest();"> 106 <body onload="runTest();">
107 <p> 107 <p>
108 This test verifies that auto-appended spaces are removed on consequent enters. 108 This test verifies that auto-appended spaces are removed on consequent enters.
109 </p> 109 </p>
110 110
111 <pre id="codeSnippet"> 111 <pre id="codeSnippet">
112 function (){} 112 function (){}
113 if (a == b) { 113 if (a == b) {
114 </pre> 114 </pre>
115 115
116 </body> 116 </body>
117 </html> 117 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698