Chromium Code Reviews| 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..8b9e6860b395fbd2c85591ea3cbad813bde39bc3 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, |
| @@ -64,5 +67,7 @@ void FrameTracker::OnEvent(const std::string& method, |
| } else if (method == "DOM.documentUpdated") { |
| frame_to_context_map_.clear(); |
| context_to_frame_map_.clear(); |
| + base::DictionaryValue params; |
| + client_->SendCommand("DOM.getDocument", params); |
|
kkania
2013/02/12 01:37:19
I don't think you don't need to do this; DOM.docum
craigdh
2013/02/12 01:41:22
We originally did that and it didn't work. http://
craigdh
2013/02/12 17:32:30
I understand what you mean now.
|
| } |
| } |