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

Unified Diff: chrome/test/chromedriver/chrome_impl.cc

Issue 12093057: [ChromeDriver] Send DOM.getDocument after each DOM.documentUpdated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 7 years, 11 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: chrome/test/chromedriver/chrome_impl.cc
diff --git a/chrome/test/chromedriver/chrome_impl.cc b/chrome/test/chromedriver/chrome_impl.cc
index 00871ebcbf870c76370a46ce1f35fae766259a94..b6b9ee9ce31095b94095dd42dc4d1a41bad6f189 100644
--- a/chrome/test/chromedriver/chrome_impl.cc
+++ b/chrome/test/chromedriver/chrome_impl.cc
@@ -94,7 +94,6 @@ ChromeImpl::ChromeImpl(base::ProcessHandle process,
context_getter_(context_getter),
port_(port),
socket_factory_(socket_factory),
- dom_tracker_(new DomTracker()),
frame_tracker_(new FrameTracker()),
navigation_tracker_(new NavigationTracker()) {
if (user_data_dir->IsValid()) {
@@ -120,23 +119,14 @@ Status ChromeImpl::Init() {
return Status(kUnknownError, "unable to discover open pages");
client_.reset(new DevToolsClientImpl(
socket_factory_, debugger_urls.front()));
+ dom_tracker_.reset(new DomTracker(client_.get()));
+ Status status = dom_tracker_->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);
+ return Status(kOk);
}
Status ChromeImpl::Load(const std::string& url) {
« no previous file with comments | « no previous file | chrome/test/chromedriver/devtools_client_impl.h » ('j') | chrome/test/chromedriver/devtools_client_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698