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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/editor/text-editor-word-jumps.html

Issue 2269183003: DevTools: Merge CodeMirrorTextEditor's copyRange into text (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 test() 6 function test()
7 { 7 {
8 function testFunction(foo, bar) 8 function testFunction(foo, bar)
9 { 9 {
10 someFunctionCall(bar); 10 someFunctionCall(bar);
(...skipping 19 matching lines...) Expand all
30 const wordJumpModifier = WebInspector.isMac() ? "altKey" : "ctrlKey"; 30 const wordJumpModifier = WebInspector.isMac() ? "altKey" : "ctrlKey";
31 const camelJumpModifier = WebInspector.isMac() ? "ctrlKey" : "altKey"; 31 const camelJumpModifier = WebInspector.isMac() ? "ctrlKey" : "altKey";
32 32
33 function dumpEditorSelection() 33 function dumpEditorSelection()
34 { 34 {
35 var selection = textEditor.selection(); 35 var selection = textEditor.selection();
36 if (selection.isEmpty()) { 36 if (selection.isEmpty()) {
37 var line = textEditor.line(selection.startLine); 37 var line = textEditor.line(selection.startLine);
38 InspectorTest.addResult(line.substring(0, selection.startColumn) + " |" + line.substring(selection.startColumn)); 38 InspectorTest.addResult(line.substring(0, selection.startColumn) + " |" + line.substring(selection.startColumn));
39 } else { 39 } else {
40 InspectorTest.addResult(">>" + textEditor.copyRange(selection.normal ize()) + "<<"); 40 InspectorTest.addResult(">>" + textEditor.text(selection.normalize() ) + "<<");
41 } 41 }
42 return selection; 42 return selection;
43 } 43 }
44 44
45 function setCursorAtBeginning() 45 function setCursorAtBeginning()
46 { 46 {
47 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 0)) ; 47 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 0)) ;
48 } 48 }
49 49
50 function setCursorAtEnd() 50 function setCursorAtEnd()
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 </script> 153 </script>
154 </head> 154 </head>
155 155
156 <body onload="runTest();"> 156 <body onload="runTest();">
157 <p> 157 <p>
158 This test checks how text editor handles different movements: ctrl-left, ctrl-ri ght, ctrl-shift-left, ctrl-backspace, alt-left, alt-right, alt-shift-left, alt-s hift-right. 158 This test checks how text editor handles different movements: ctrl-left, ctrl-ri ght, ctrl-shift-left, ctrl-backspace, alt-left, alt-right, alt-shift-left, alt-s hift-right.
159 </p> 159 </p>
160 160
161 </body> 161 </body>
162 </html> 162 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698