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

Side by Side Diff: LayoutTests/inspector/jump-to-previous-editing-location.html

Issue 303383002: Revert of DevTools: excessive dumping for jump-to-previous-position.html test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/jump-to-previous-editing-location-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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="../http/tests/inspector/workspace-test.js"></script> 4 <script src="../http/tests/inspector/workspace-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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 for (var i = 0; i < 3; ++i) { 171 for (var i = 0; i < 3; ++i) {
172 rollover(); 172 rollover();
173 dumpSelection(panel.visibleView.textEditor, "Rolled over"); 173 dumpSelection(panel.visibleView.textEditor, "Rolled over");
174 } 174 }
175 next(); 175 next();
176 }, 176 },
177 177
178 function testHistoryDepth(next) 178 function testHistoryDepth(next)
179 { 179 {
180 function dumpSimpleHistoryManagerState(title)
181 {
182 var simpleHistoryManager = historyManager._historyManager;
183 var entries = simpleHistoryManager._entries;
184 InspectorTest.addResult("=== SimpleHistoryManager state " + titl e + " ===");
185 InspectorTest.addResult("entries count: " + entries.length);
186 for (var i = entries.length - 1; i >= 0; --i) {
187 var position = entries[i]._positionHandle.resolve();
188 var positionText = position ? "{line: " + position.lineNumbe r + ", column: " + position.columnNumber + "}" : position + "";
189 var positionMarker = simpleHistoryManager._activeEntryIndex === i ? ">" : " ";
190 InspectorTest.addResult(positionMarker + "entry[" + i + "] = " + positionText);
191 }
192 InspectorTest.addResult("=== ===");
193 }
194 var lines = []; 180 var lines = [];
195 var columns = []; 181 var columns = [];
196 const jumpsAmount = WebInspector.EditingLocationHistoryManager.Histo ryDepth; 182 const jumpsAmount = WebInspector.EditingLocationHistoryManager.Histo ryDepth;
197 for(var i = 0; i < jumpsAmount; ++i) { 183 for(var i = 0; i < jumpsAmount; ++i) {
198 lines.push(i + 10); 184 lines.push(i + 10);
199 columns.push(7); 185 columns.push(7);
200 } 186 }
201 var editor = panel.visibleView.textEditor; 187 var editor = panel.visibleView.textEditor;
202 //FIXME(lushnikov): here and below excessive dumping to figure out a reason for
203 // unreproducible bot failures.
204 dumpSimpleHistoryManagerState("before filling history stack");
205 clickAndDump(editor, lines, columns); 188 clickAndDump(editor, lines, columns);
206 dumpSimpleHistoryManagerState("after filling history stack"); 189 for (var i = 0; i < jumpsAmount; ++i) {
207
208 InspectorTest.addResult("First rollback result: " + historyManager._ historyManager.rollback());
209 dumpSimpleHistoryManagerState("after first rollback");
210 dumpSelection(editor, "Rolled back");
211
212 for (var i = 0; i < jumpsAmount - 1; ++i) {
213 rollback(); 190 rollback();
214 dumpSelection(editor, "Rolled back"); 191 dumpSelection(editor, "Rolled back");
215 } 192 }
216 next(); 193 next();
217 }, 194 },
218 195
219 function testInFileSearch(next) 196 function testInFileSearch(next)
220 { 197 {
221 var searchableView = panel.searchableView(); 198 var searchableView = panel.searchableView();
222 199
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 257 }
281 } 258 }
282 ]); 259 ]);
283 }; 260 };
284 </script> 261 </script>
285 </head> 262 </head>
286 <body onload="runTest()"> 263 <body onload="runTest()">
287 <p>Tests that jumping to previous location works as intended.</p> 264 <p>Tests that jumping to previous location works as intended.</p>
288 </body> 265 </body>
289 </html> 266 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/jump-to-previous-editing-location-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698