Index: chrome/test/chromedriver/frame_tracker.cc |
diff --git a/chrome/test/chromedriver/frame_tracker.cc b/chrome/test/chromedriver/frame_tracker.cc |
index dd1786272724a685489c50efc731a04c11167c2c..e03c105a998167248ca7a5eae484abab736b450a 100644 |
--- a/chrome/test/chromedriver/frame_tracker.cc |
+++ b/chrome/test/chromedriver/frame_tracker.cc |
@@ -38,7 +38,10 @@ Status FrameTracker::GetContextIdForFrame( |
Status FrameTracker::OnConnected() { |
// Enable runtime events to allow tracking execution context creation. |
base::DictionaryValue params; |
- return client_->SendCommand("Runtime.enable", params); |
+ Status status = client_->SendCommand("Runtime.enable", params); |
+ if (status.IsError()) |
+ return status; |
+ return client_->SendCommand("DOM.getDocument", params); |
} |
void FrameTracker::OnEvent(const std::string& method, |