| 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/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 InspectorTest.addSniffer(historyManager._historyManager, "filterOut", functi
on() { | |
| 17 InspectorTest.addResult("executed SimpleHistoryManager.filterOut; active
EntryIndex = " + historyManager._historyManager._activeEntryIndex); | |
| 18 }, true); | |
| 19 | 16 |
| 20 function rollback() | 17 function rollback() |
| 21 { | 18 { |
| 22 historyManager.rollback(); | 19 historyManager.rollback(); |
| 23 } | 20 } |
| 24 | 21 |
| 25 function rollover() | 22 function rollover() |
| 26 { | 23 { |
| 27 historyManager.rollover(); | 24 historyManager.rollover(); |
| 28 } | 25 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 next(); | 175 next(); |
| 179 }, | 176 }, |
| 180 | 177 |
| 181 function testHistoryDepth(next) | 178 function testHistoryDepth(next) |
| 182 { | 179 { |
| 183 function dumpSimpleHistoryManagerState(title) | 180 function dumpSimpleHistoryManagerState(title) |
| 184 { | 181 { |
| 185 var simpleHistoryManager = historyManager._historyManager; | 182 var simpleHistoryManager = historyManager._historyManager; |
| 186 var entries = simpleHistoryManager._entries; | 183 var entries = simpleHistoryManager._entries; |
| 187 InspectorTest.addResult("=== SimpleHistoryManager state " + titl
e + " ==="); | 184 InspectorTest.addResult("=== SimpleHistoryManager state " + titl
e + " ==="); |
| 188 InspectorTest.addResult("entries count: " + entries.length + " a
ctive entry index: " + simpleHistoryManager._activeEntryIndex); | 185 InspectorTest.addResult("entries count: " + entries.length); |
| 189 for (var i = entries.length - 1; i >= 0; --i) { | 186 for (var i = entries.length - 1; i >= 0; --i) { |
| 190 var position = entries[i]._positionHandle.resolve(); | 187 var position = entries[i]._positionHandle.resolve(); |
| 191 var positionText = position ? "{line: " + position.lineNumbe
r + ", column: " + position.columnNumber + "}" : position + ""; | 188 var positionText = position ? "{line: " + position.lineNumbe
r + ", column: " + position.columnNumber + "}" : position + ""; |
| 192 var positionMarker = simpleHistoryManager._activeEntryIndex
=== i ? ">" : " "; | 189 var positionMarker = simpleHistoryManager._activeEntryIndex
=== i ? ">" : " "; |
| 193 InspectorTest.addResult(positionMarker + "entry[" + i + "] =
" + positionText); | 190 InspectorTest.addResult(positionMarker + "entry[" + i + "] =
" + positionText); |
| 194 } | 191 } |
| 195 InspectorTest.addResult("=== ==="); | 192 InspectorTest.addResult("=== ==="); |
| 196 } | 193 } |
| 197 var lines = []; | 194 var lines = []; |
| 198 var columns = []; | 195 var columns = []; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 280 } |
| 284 } | 281 } |
| 285 ]); | 282 ]); |
| 286 }; | 283 }; |
| 287 </script> | 284 </script> |
| 288 </head> | 285 </head> |
| 289 <body onload="runTest()"> | 286 <body onload="runTest()"> |
| 290 <p>Tests that jumping to previous location works as intended.</p> | 287 <p>Tests that jumping to previous location works as intended.</p> |
| 291 </body> | 288 </body> |
| 292 </html> | 289 </html> |
| OLD | NEW |