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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/editor/text-editor-home-button.html

Issue 2769843003: DevTools: split text_utils out of common module (Closed)
Patch Set: rebaseline Created 3 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 <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 {
(...skipping 28 matching lines...) Expand all
39 return; 39 return;
40 } 40 }
41 callback(); 41 callback();
42 } 42 }
43 homeButton(shift, hitButtonCallback); 43 homeButton(shift, hitButtonCallback);
44 } 44 }
45 45
46 InspectorTest.runTestSuite([ 46 InspectorTest.runTestSuite([
47 function testFirstNonBlankCharacter(next) 47 function testFirstNonBlankCharacter(next)
48 { 48 {
49 var selection = Common.TextRange.createFromLocation(2, 8); 49 var selection = TextUtils.TextRange.createFromLocation(2, 8);
50 textEditor.setSelection(selection); 50 textEditor.setSelection(selection);
51 InspectorTest.dumpTextWithSelection(textEditor); 51 InspectorTest.dumpTextWithSelection(textEditor);
52 hitHomeButton(false, 1, next); 52 hitHomeButton(false, 1, next);
53 }, 53 },
54 54
55 function testFirstNonBlankCharacterFromWhitespace(next) 55 function testFirstNonBlankCharacterFromWhitespace(next)
56 { 56 {
57 var selection = Common.TextRange.createFromLocation(2, 2); 57 var selection = TextUtils.TextRange.createFromLocation(2, 2);
58 textEditor.setSelection(selection); 58 textEditor.setSelection(selection);
59 InspectorTest.dumpTextWithSelection(textEditor); 59 InspectorTest.dumpTextWithSelection(textEditor);
60 hitHomeButton(false, 1, next); 60 hitHomeButton(false, 1, next);
61 }, 61 },
62 62
63 function testHomeButtonToggling(next) 63 function testHomeButtonToggling(next)
64 { 64 {
65 var selection = Common.TextRange.createFromLocation(2, 2); 65 var selection = TextUtils.TextRange.createFromLocation(2, 2);
66 textEditor.setSelection(selection); 66 textEditor.setSelection(selection);
67 InspectorTest.dumpTextWithSelection(textEditor); 67 InspectorTest.dumpTextWithSelection(textEditor);
68 hitHomeButton(false, 3, next); 68 hitHomeButton(false, 3, next);
69 }, 69 },
70 70
71 function testHomeButtonDoesNotChangeCursor(next) 71 function testHomeButtonDoesNotChangeCursor(next)
72 { 72 {
73 var selection = Common.TextRange.createFromLocation(0, 2); 73 var selection = TextUtils.TextRange.createFromLocation(0, 2);
74 textEditor.setSelection(selection); 74 textEditor.setSelection(selection);
75 InspectorTest.dumpTextWithSelection(textEditor); 75 InspectorTest.dumpTextWithSelection(textEditor);
76 hitHomeButton(false, 2, next); 76 hitHomeButton(false, 2, next);
77 }, 77 },
78 78
79 function testHomeButtonWithShift(next) 79 function testHomeButtonWithShift(next)
80 { 80 {
81 var selection = new Common.TextRange(0, 0, 2, 8); 81 var selection = new TextUtils.TextRange(0, 0, 2, 8);
82 textEditor.setSelection(selection); 82 textEditor.setSelection(selection);
83 InspectorTest.dumpTextWithSelection(textEditor); 83 InspectorTest.dumpTextWithSelection(textEditor);
84 hitHomeButton(true, 3, next); 84 hitHomeButton(true, 3, next);
85 }, 85 },
86 86
87 function testHomeButtonWithShiftInversed(next) 87 function testHomeButtonWithShiftInversed(next)
88 { 88 {
89 var selection = new Common.TextRange(3, 1, 2, 8); 89 var selection = new TextUtils.TextRange(3, 1, 2, 8);
90 textEditor.setSelection(selection); 90 textEditor.setSelection(selection);
91 InspectorTest.dumpTextWithSelection(textEditor); 91 InspectorTest.dumpTextWithSelection(textEditor);
92 hitHomeButton(true, 3, next); 92 hitHomeButton(true, 3, next);
93 } 93 }
94 ]); 94 ]);
95 } 95 }
96 96
97 </script> 97 </script>
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