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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 1828983002: Revert of [DevTools] Use InspectorFrontendHost.readyForTest for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ready-for-test
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/devtools/front_end/main/Main.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index b67f01d7f5f91b22f1edc76880e3e0f41c913caf..d7953f71171d9d093e3ca034e35011d671f645d9 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -318,20 +318,22 @@
this._mainTarget.registerInspectorDispatcher(this);
InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.ReloadInspectedPage, this._reloadInspectedPage, this);
- InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this);
if (this._mainTarget.isServiceWorker() || this._mainTarget.isPage())
this._mainTarget.runtimeAgent().run();
- this._mainTarget.inspectorAgent().enable();
- InspectorFrontendHost.readyForTest();
-
- // Asynchronously run the extensions.
- setTimeout(lateInitialization, 0);
+ this._mainTarget.inspectorAgent().enable(inspectorAgentEnableCallback);
+
+ function inspectorAgentEnableCallback()
+ {
+ console.timeStamp("Main.inspectorAgentEnableCallback");
+ InspectorFrontendHost.readyForTest();
+ // Asynchronously run the extensions.
+ setTimeout(lateInitialization, 0);
+ }
function lateInitialization()
{
- console.timeStamp("Main.lateInitialization");
WebInspector.extensionServer.initializeExtensions();
}
},
@@ -609,15 +611,14 @@
},
/**
- * @param {!WebInspector.Event} event
- */
- _evaluateForTestInFrontend: function(event)
+ * @override
+ * @param {number} callId
+ * @param {string} script
+ */
+ evaluateForTestInFrontend: function(callId, script)
{
if (!InspectorFrontendHost.isUnderTest())
return;
-
- var callId = /** @type {number} */ (event.data["callId"]);
- var script = /** @type {number} */ (event.data["script"]);
/**
* @suppressGlobalPropertiesCheck

Powered by Google App Engine
This is Rietveld 408576698