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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp

Issue 1819243002: [DevTools] Use InspectorFrontendHost.readyForTest for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ready-for-test
Patch Set: resource-tree-reload.html fix 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/core/inspector/InspectorInspectorAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp
index c5e0a6273e67c4a46589f6126c1f456a496a6698..e88b11b5fda3c7bda13c2d89d664f28e3b693620 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp
@@ -57,33 +57,11 @@ InspectorInspectorAgent::~InspectorInspectorAgent()
void InspectorInspectorAgent::enable(ErrorString*)
{
m_state->setBoolean(InspectorAgentState::inspectorAgentEnabled, true);
- for (Vector<std::pair<long, String>>::iterator it = m_pendingEvaluateTestCommands.begin(); frontend() && it != m_pendingEvaluateTestCommands.end(); ++it)
- frontend()->evaluateForTestInFrontend(static_cast<int>((*it).first), (*it).second);
- m_pendingEvaluateTestCommands.clear();
}
void InspectorInspectorAgent::disable(ErrorString*)
{
m_state->setBoolean(InspectorAgentState::inspectorAgentEnabled, false);
- m_pendingEvaluateTestCommands.clear();
-}
-
-void InspectorInspectorAgent::restore()
-{
- if (m_state->booleanProperty(InspectorAgentState::inspectorAgentEnabled, false)) {
- ErrorString error;
- enable(&error);
- }
-}
-
-void InspectorInspectorAgent::evaluateForTestInFrontend(long callId, const String& script)
-{
- if (m_state->booleanProperty(InspectorAgentState::inspectorAgentEnabled, false)) {
- frontend()->evaluateForTestInFrontend(static_cast<int>(callId), script);
- frontend()->flush();
- } else {
- m_pendingEvaluateTestCommands.append(std::pair<long, String>(callId, script));
- }
}
void InspectorInspectorAgent::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> objectToInspect, PassOwnPtr<protocol::DictionaryValue> hints)

Powered by Google App Engine
This is Rietveld 408576698