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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html

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/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
index 2d1a92aec34b7090d01ec80e8c84fbbf7ca752f8..9d14a2bfff3a8c231bba9bdee4557c3c969d9003 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
@@ -137,12 +137,6 @@
return this._requestId;
}
-InspectorTest.readyForTest = function()
-{
- var embedderMessage = { "id": ++this._embedderRequestId, "method": "readyForTest" };
- DevToolsHost.sendMessageToEmbedder(JSON.stringify(embedderMessage));
-}
-
/**
* @param {string|!Object} messageOrObject
*/
@@ -170,20 +164,6 @@
}
/**
- * @param {number} callId
- * @param {string} script
- */
-DevToolsAPI.evaluateForTestInFrontend = function(callId, script)
-{
- try {
- eval(script);
- } catch (e) {
- InspectorTest.log("FAIL: exception in evaluateForTestInFrontend: " + e);
- InspectorTest.completeTest();
- }
-}
-
-/**
* Logs message to document.
* @param {string} message
*/
@@ -400,7 +380,22 @@
callback(value);
}
-window.addEventListener("load", InspectorTest.readyForTest.bind(InspectorTest), false);
+InspectorTest.eventHandler["Inspector.evaluateForTestInFrontend"] = function(message)
+{
+ try {
+ eval(message.params.script);
+ } catch (e) {
+ InspectorTest.log("FAIL: exception in evaluateForTestInFrontend: " + e);
+ InspectorTest.completeTest();
+ }
+};
+
+function enableInspectorAgent()
+{
+ InspectorTest.sendCommand("Inspector.enable", { });
+}
+
+window.addEventListener("load", enableInspectorAgent, false);
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698