| Index: chrome/test/chromedriver/chrome_impl.cc
|
| diff --git a/chrome/test/chromedriver/chrome_impl.cc b/chrome/test/chromedriver/chrome_impl.cc
|
| index 00871ebcbf870c76370a46ce1f35fae766259a94..2db17ef9bc03b1d24e87629b11ed590afc760cdc 100644
|
| --- a/chrome/test/chromedriver/chrome_impl.cc
|
| +++ b/chrome/test/chromedriver/chrome_impl.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/time.h"
|
| #include "base/values.h"
|
| #include "chrome/test/chromedriver/devtools_client_impl.h"
|
| +#include "chrome/test/chromedriver/devtools_state.h"
|
| #include "chrome/test/chromedriver/dom_tracker.h"
|
| #include "chrome/test/chromedriver/frame_tracker.h"
|
| #include "chrome/test/chromedriver/js.h"
|
| @@ -120,23 +121,15 @@ Status ChromeImpl::Init() {
|
| return Status(kUnknownError, "unable to discover open pages");
|
| client_.reset(new DevToolsClientImpl(
|
| socket_factory_, debugger_urls.front()));
|
| + client_state_.reset(new DevToolsState(client_.get()));
|
| + Status status = client_state_->Init();
|
| + if (status.IsError())
|
| + return status;
|
| client_->AddListener(dom_tracker_.get());
|
| client_->AddListener(frame_tracker_.get());
|
| client_->AddListener(navigation_tracker_.get());
|
| -
|
| - // Perform necessary configuration of the DevTools client.
|
| - // Fetch the root document node so that Inspector will push DOM node
|
| - // information to the client.
|
| - base::DictionaryValue params;
|
| - Status status = client_->SendCommand("DOM.getDocument", params);
|
| - if (status.IsError())
|
| - return status;
|
| - // Enable page domain notifications to allow tracking navigation state.
|
| - status = client_->SendCommand("Page.enable", params);
|
| - if (status.IsError())
|
| - return status;
|
| - // Enable runtime events to allow tracking execution context creation.
|
| - return client_->SendCommand("Runtime.enable", params);
|
| + client_->AddListener(client_state_.get());
|
| + return Status(kOk);
|
| }
|
|
|
| Status ChromeImpl::Load(const std::string& url) {
|
|
|