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

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

Issue 304303004: Revert of DevTools: even more logging for jump-to-previous-editing-location.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 {
11 WebInspector.inspectorView.showPanel("sources"); 11 WebInspector.inspectorView.showPanel("sources");
12 var panel = WebInspector.panels.sources; 12 var panel = WebInspector.panels.sources;
13 var sourcesView = panel._sourcesView; 13 var sourcesView = panel._sourcesView;
14 var historyManager = sourcesView._historyManager; 14 var historyManager = sourcesView._historyManager;
15 var editorContainer = sourcesView._editorContainer; 15 var editorContainer = sourcesView._editorContainer;
16 var shouldLogSimpleHistoryManager = false; 16 InspectorTest.addSniffer(historyManager._historyManager, "filterOut", functi on() {
17 17 InspectorTest.addResult("executed SimpleHistoryManager.filterOut; active EntryIndex = " + historyManager._historyManager._activeEntryIndex);
18 function logSimpleHistoryManagerMethod(methodName) 18 }, true);
19 {
20 if (!shouldLogSimpleHistoryManager)
21 return;
22 InspectorTest.addResult("SimpleHistoryManager." + methodName + " size: " + historyManager._historyManager._entries.length + " active: " + historyManager ._historyManager._activeEntryIndex);
23 }
24 InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "push" , logSimpleHistoryManagerMethod.bind(null, "push"), true);
25 InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "activ e", logSimpleHistoryManagerMethod.bind(null, "active"), true);
26 InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "rollb ack", logSimpleHistoryManagerMethod.bind(null, "rollback"), true);
27 InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "rollo ver", logSimpleHistoryManagerMethod.bind(null, "rollover"), true);
28 InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "filte rOut", logSimpleHistoryManagerMethod.bind(null, "filterOut"), true);
29 19
30 function rollback() 20 function rollback()
31 { 21 {
32 historyManager.rollback(); 22 historyManager.rollback();
33 } 23 }
34 24
35 function rollover() 25 function rollover()
36 { 26 {
37 historyManager.rollover(); 27 historyManager.rollover();
38 } 28 }
(...skipping 14 matching lines...) Expand all
53 function eventSenderClickAtEditor(editor, lineNumber, columnNumber) 43 function eventSenderClickAtEditor(editor, lineNumber, columnNumber)
54 { 44 {
55 editor.scrollToLine(lineNumber); 45 editor.scrollToLine(lineNumber);
56 var coordinates = editor.cursorPositionToCoordinates(lineNumber, columnN umber); 46 var coordinates = editor.cursorPositionToCoordinates(lineNumber, columnN umber);
57 eventSender.mouseMoveTo(coordinates.x, coordinates.y); 47 eventSender.mouseMoveTo(coordinates.x, coordinates.y);
58 eventSender.mouseDown(); 48 eventSender.mouseDown();
59 eventSender.mouseUp(); 49 eventSender.mouseUp();
60 dumpSelection(editor, "Mouse click (" + lineNumber + ", " + columnNumber + ")"); 50 dumpSelection(editor, "Mouse click (" + lineNumber + ", " + columnNumber + ")");
61 } 51 }
62 52
63 function clickAndDump(editor, lines, columns, logLocation) 53 function clickAndDump(editor, lines, columns)
64 { 54 {
65 for (var i = 0; i < lines.length; ++i) { 55 for (var i = 0; i < lines.length; ++i) {
66 var lineNumber = lines[i]; 56 var lineNumber = lines[i];
67 var columnNumber = columns[i]; 57 var columnNumber = columns[i];
68 var originSelection = editor.selection(); 58 var originSelection = editor.selection();
69 editor.setSelection(WebInspector.TextRange.createFromLocation(lineNu mber, columnNumber)); 59 editor.setSelection(WebInspector.TextRange.createFromLocation(lineNu mber, columnNumber));
70 editor._delegate.onJumpToPosition(originSelection, editor.selection( )); 60 editor._delegate.onJumpToPosition(originSelection, editor.selection( ));
71 dumpSelection(editor, "Mouse click (" + lineNumber + ", " + columnNu mber + ")"); 61 dumpSelection(editor, "Mouse click (" + lineNumber + ", " + columnNu mber + ")");
72 } 62 }
73 } 63 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 var lines = []; 197 var lines = [];
208 var columns = []; 198 var columns = [];
209 const jumpsAmount = WebInspector.EditingLocationHistoryManager.Histo ryDepth; 199 const jumpsAmount = WebInspector.EditingLocationHistoryManager.Histo ryDepth;
210 for(var i = 0; i < jumpsAmount; ++i) { 200 for(var i = 0; i < jumpsAmount; ++i) {
211 lines.push(i + 10); 201 lines.push(i + 10);
212 columns.push(7); 202 columns.push(7);
213 } 203 }
214 var editor = panel.visibleView.textEditor; 204 var editor = panel.visibleView.textEditor;
215 //FIXME(lushnikov): here and below excessive dumping to figure out a reason for 205 //FIXME(lushnikov): here and below excessive dumping to figure out a reason for
216 // unreproducible bot failures. 206 // unreproducible bot failures.
217 shouldLogSimpleHistoryManager = true;
218 dumpSimpleHistoryManagerState("before filling history stack"); 207 dumpSimpleHistoryManagerState("before filling history stack");
219 clickAndDump(editor, lines, columns, true); 208 clickAndDump(editor, lines, columns);
220 dumpSimpleHistoryManagerState("after filling history stack"); 209 dumpSimpleHistoryManagerState("after filling history stack");
221 210
222 InspectorTest.addResult("First rollback result: " + historyManager._ historyManager.rollback()); 211 InspectorTest.addResult("First rollback result: " + historyManager._ historyManager.rollback());
223 dumpSimpleHistoryManagerState("after first rollback"); 212 dumpSimpleHistoryManagerState("after first rollback");
224 dumpSelection(editor, "Rolled back"); 213 dumpSelection(editor, "Rolled back");
225 shouldLogSimpleHistoryManager = false;
226 214
227 for (var i = 0; i < jumpsAmount - 1; ++i) { 215 for (var i = 0; i < jumpsAmount - 1; ++i) {
228 rollback(); 216 rollback();
229 dumpSelection(editor, "Rolled back"); 217 dumpSelection(editor, "Rolled back");
230 } 218 }
231 next(); 219 next();
232 }, 220 },
233 221
234 function testInFileSearch(next) 222 function testInFileSearch(next)
235 { 223 {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 283 }
296 } 284 }
297 ]); 285 ]);
298 }; 286 };
299 </script> 287 </script>
300 </head> 288 </head>
301 <body onload="runTest()"> 289 <body onload="runTest()">
302 <p>Tests that jumping to previous location works as intended.</p> 290 <p>Tests that jumping to previous location works as intended.</p>
303 </body> 291 </body>
304 </html> 292 </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