OLD | NEW |
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="../http/tests/inspector/console-test.js"></script> | 4 <script src="../http/tests/inspector/console-test.js"></script> |
5 <script src="../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../http/tests/inspector/debugger-test.js"></script> |
6 <script src="resources/example-fileset-for-test.js"></script> | 6 <script src="resources/example-fileset-for-test.js"></script> |
7 <script src="editor/editor-test.js"></script> | 7 <script src="editor/editor-test.js"></script> |
8 <script> | 8 <script> |
9 function test() | 9 function test() |
10 { | 10 { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 eventSender.mouseUp(); | 45 eventSender.mouseUp(); |
46 dumpSelection("Mouse click (" + lineNumber + ", " + columnNumber + ")"); | 46 dumpSelection("Mouse click (" + lineNumber + ", " + columnNumber + ")"); |
47 } | 47 } |
48 | 48 |
49 function clickAndDump(editor, lines, columns) | 49 function clickAndDump(editor, lines, columns) |
50 { | 50 { |
51 for (var i = 0; i < lines.length; ++i) { | 51 for (var i = 0; i < lines.length; ++i) { |
52 var lineNumber = lines[i]; | 52 var lineNumber = lines[i]; |
53 var columnNumber = columns[i]; | 53 var columnNumber = columns[i]; |
54 var originSelection = editor.selection(); | 54 var originSelection = editor.selection(); |
55 editor.setSelection(Common.TextRange.createFromLocation(lineNumber,
columnNumber)); | 55 editor.setSelection(TextUtils.TextRange.createFromLocation(lineNumbe
r, columnNumber)); |
56 editor._reportJump(originSelection, editor.selection()); | 56 editor._reportJump(originSelection, editor.selection()); |
57 dumpSelection("Mouse click (" + lineNumber + ", " + columnNumber + "
)"); | 57 dumpSelection("Mouse click (" + lineNumber + ", " + columnNumber + "
)"); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 InspectorTest.runTestSuite([ | 61 InspectorTest.runTestSuite([ |
62 function testSimpleMovements(next) | 62 function testSimpleMovements(next) |
63 { | 63 { |
64 InspectorTest.showScriptSource("example-fileset-for-test.js", onCont
entLoaded); | 64 InspectorTest.showScriptSource("example-fileset-for-test.js", onCont
entLoaded); |
65 | 65 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 for (var i = 0; i < jumpsToDo; ++i) { | 106 for (var i = 0; i < jumpsToDo; ++i) { |
107 rollover(); | 107 rollover(); |
108 dumpSelection("Rolled over"); | 108 dumpSelection("Rolled over"); |
109 } | 109 } |
110 next(); | 110 next(); |
111 }, | 111 }, |
112 | 112 |
113 function testDeletePreviousJumpLocations(next) | 113 function testDeletePreviousJumpLocations(next) |
114 { | 114 { |
115 var editor = panel.visibleView.textEditor; | 115 var editor = panel.visibleView.textEditor; |
116 editor.editRange(new Common.TextRange(9, 0, 15, 0), ""); | 116 editor.editRange(new TextUtils.TextRange(9, 0, 15, 0), ""); |
117 dumpSelection("Removed lines from 9 to 15"); | 117 dumpSelection("Removed lines from 9 to 15"); |
118 rollback(); | 118 rollback(); |
119 dumpSelection("Rolled back"); | 119 dumpSelection("Rolled back"); |
120 rollover(); | 120 rollover(); |
121 dumpSelection("Rolled over"); | 121 dumpSelection("Rolled over"); |
122 next(); | 122 next(); |
123 }, | 123 }, |
124 | 124 |
125 function testDeleteNextJumpLocations(next) | 125 function testDeleteNextJumpLocations(next) |
126 { | 126 { |
127 var editor = panel.visibleView.textEditor; | 127 var editor = panel.visibleView.textEditor; |
128 const jumpsToDo = 4; | 128 const jumpsToDo = 4; |
129 clickAndDump(editor, [10, 11, 12, 13], [3, 4, 5, 6]); | 129 clickAndDump(editor, [10, 11, 12, 13], [3, 4, 5, 6]); |
130 | 130 |
131 for (var i = 0; i < jumpsToDo; ++i) | 131 for (var i = 0; i < jumpsToDo; ++i) |
132 rollback(); | 132 rollback(); |
133 dumpSelection("Rolled back 4 times"); | 133 dumpSelection("Rolled back 4 times"); |
134 editor.editRange(new Common.TextRange(9, 0, 11, 0), ""); | 134 editor.editRange(new TextUtils.TextRange(9, 0, 11, 0), ""); |
135 dumpSelection("Removed lines from 9 to 11"); | 135 dumpSelection("Removed lines from 9 to 11"); |
136 rollover(); | 136 rollover(); |
137 dumpSelection("Rolled over"); | 137 dumpSelection("Rolled over"); |
138 next(); | 138 next(); |
139 }, | 139 }, |
140 | 140 |
141 function testCrossFileJump(next) | 141 function testCrossFileJump(next) |
142 { | 142 { |
143 InspectorTest.showScriptSource("editor-test.js", onContentLoaded); | 143 InspectorTest.showScriptSource("editor-test.js", onContentLoaded); |
144 function onContentLoaded() | 144 function onContentLoaded() |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 } | 258 } |
259 ]); | 259 ]); |
260 }; | 260 }; |
261 </script> | 261 </script> |
262 </head> | 262 </head> |
263 <body onload="runTest()"> | 263 <body onload="runTest()"> |
264 <p>Tests that jumping to previous location works as intended.</p> | 264 <p>Tests that jumping to previous location works as intended.</p> |
265 </body> | 265 </body> |
266 </html> | 266 </html> |
OLD | NEW |