Index: LayoutTests/inspector/jump-to-previous-editing-location.html |
diff --git a/LayoutTests/inspector/jump-to-previous-editing-location.html b/LayoutTests/inspector/jump-to-previous-editing-location.html |
index 3fc1a1eb382ef62c344e3d279799cd8897c8c260..79d50521120b3a5ed51589e2e96ca1aad6d52421 100644 |
--- a/LayoutTests/inspector/jump-to-previous-editing-location.html |
+++ b/LayoutTests/inspector/jump-to-previous-editing-location.html |
@@ -13,9 +13,19 @@ function test() |
var sourcesView = panel._sourcesView; |
var historyManager = sourcesView._historyManager; |
var editorContainer = sourcesView._editorContainer; |
- InspectorTest.addSniffer(historyManager._historyManager, "filterOut", function() { |
- InspectorTest.addResult("executed SimpleHistoryManager.filterOut; activeEntryIndex = " + historyManager._historyManager._activeEntryIndex); |
- }, true); |
+ var shouldLogSimpleHistoryManager = false; |
+ |
+ function logSimpleHistoryManagerMethod(methodName) |
+ { |
+ if (!shouldLogSimpleHistoryManager) |
+ return; |
+ InspectorTest.addResult("SimpleHistoryManager." + methodName + " size: " + historyManager._historyManager._entries.length + " active: " + historyManager._historyManager._activeEntryIndex); |
+ } |
+ InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "push", logSimpleHistoryManagerMethod.bind(null, "push"), true); |
+ InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "active", logSimpleHistoryManagerMethod.bind(null, "active"), true); |
+ InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "rollback", logSimpleHistoryManagerMethod.bind(null, "rollback"), true); |
+ InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "rollover", logSimpleHistoryManagerMethod.bind(null, "rollover"), true); |
+ InspectorTest.addSniffer(WebInspector.SimpleHistoryManager.prototype, "filterOut", logSimpleHistoryManagerMethod.bind(null, "filterOut"), true); |
function rollback() |
{ |
@@ -50,7 +60,7 @@ function test() |
dumpSelection(editor, "Mouse click (" + lineNumber + ", " + columnNumber + ")"); |
} |
- function clickAndDump(editor, lines, columns) |
+ function clickAndDump(editor, lines, columns, logLocation) |
{ |
for (var i = 0; i < lines.length; ++i) { |
var lineNumber = lines[i]; |
@@ -204,13 +214,15 @@ function test() |
var editor = panel.visibleView.textEditor; |
//FIXME(lushnikov): here and below excessive dumping to figure out a reason for |
// unreproducible bot failures. |
+ shouldLogSimpleHistoryManager = true; |
dumpSimpleHistoryManagerState("before filling history stack"); |
- clickAndDump(editor, lines, columns); |
+ clickAndDump(editor, lines, columns, true); |
dumpSimpleHistoryManagerState("after filling history stack"); |
InspectorTest.addResult("First rollback result: " + historyManager._historyManager.rollback()); |
dumpSimpleHistoryManagerState("after first rollback"); |
dumpSelection(editor, "Rolled back"); |
+ shouldLogSimpleHistoryManager = false; |
for (var i = 0; i < jumpsAmount - 1; ++i) { |
rollback(); |