Index: third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html |
diff --git a/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html b/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html |
index 1e46130dd320c3d4b4110fa7be4b5bc4d8d341a0..e890b59ebd76d29cfb74e4afc4f2126cea6f91dd 100644 |
--- a/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html |
+++ b/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html |
@@ -51,8 +51,7 @@ var test = function() |
dumpConsoleMessageURLs(); |
InspectorTest.addResult("Pre-format row message list:"); |
InspectorTest.addResult(JSON.stringify(Object.keys(sourceFrame._rowMessageBuckets))); |
- InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted); |
- scriptFormatter._toggleFormatScriptSource(); |
+ formatVisibleSourceFrame(uiSourceCodeScriptFormatted); |
pfeldman
2016/01/20 19:23:51
InspectorTest.showScriptSource
lushnikov
2016/01/20 23:35:58
Done.
|
} |
function uiSourceCodeScriptFormatted() |
@@ -66,6 +65,22 @@ var test = function() |
} |
]); |
+ function formatVisibleSourceFrame(callback) |
+ { |
+ InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", onSourceFormatted); |
+ scriptFormatter._toggleFormatScriptSource(); |
+ |
+ function onSourceFormatted() |
+ { |
+ var formattedSourceFrame = panel.visibleView; |
+ if (formattedSourceFrame.loaded) { |
+ callback(); |
+ return; |
+ } |
+ InspectorTest.addSniffer(WebInspector.UISourceCodeFrame.prototype, "onTextEditorContentLoaded", callback); |
+ } |
+ } |
+ |
function dumpConsoleMessageURLs() |
{ |
var messages = WebInspector.ConsolePanel._view()._visibleViewMessages; |