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

Unified Diff: Source/devtools/front_end/main/Tests.js

Issue 655203002: DevTools: repair WorkerDevToolsSanityTest.InspectSharedWorker browser test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Tests.js
diff --git a/Source/devtools/front_end/main/Tests.js b/Source/devtools/front_end/main/Tests.js
index 0b2a1746034df1069a00d42e0d8e39e9e4694848..cbd5ede269c285f5e23a308b02cb1740898a78a4 100644
--- a/Source/devtools/front_end/main/Tests.js
+++ b/Source/devtools/front_end/main/Tests.js
@@ -772,6 +772,7 @@ TestSuite.prototype.evaluateInConsole_ = function(code, callback)
{
function innerEvaluate()
{
+ WebInspector.context.removeFlavorChangeListener(WebInspector.ExecutionContext, showConsoleAndEvaluate, this);
var consoleView = WebInspector.ConsolePanel._view();
consoleView._prompt.text = code;
consoleView._promptElement.dispatchEvent(TestSuite.createKeyEvent("Enter"));
@@ -782,12 +783,16 @@ TestSuite.prototype.evaluateInConsole_ = function(code, callback)
}.bind(this));
}
+ function showConsoleAndEvaluate()
+ {
+ WebInspector.console.showPromise().then(innerEvaluate.bind(this));
+ }
+
if (!WebInspector.context.flavor(WebInspector.ExecutionContext)) {
- WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext, innerEvaluate, this);
+ WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext, showConsoleAndEvaluate, this);
return;
}
-
- WebInspector.console.showPromise().then(innerEvaluate.bind(this));
+ showConsoleAndEvaluate.call(this);
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698