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

Unified Diff: chrome/test/webdriver/commands/webdriver_command.cc

Issue 7139001: In chromedriver, add /log url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 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
« no previous file with comments | « chrome/test/webdriver/commands/create_session.cc ('k') | chrome/test/webdriver/dispatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/commands/webdriver_command.cc
diff --git a/chrome/test/webdriver/commands/webdriver_command.cc b/chrome/test/webdriver/commands/webdriver_command.cc
index 133b6a0d2dd268fd303e8fee3c18ca28a8a6a0c7..f7000da8e77407d2468a46f258b8cf8aeb1dc86a 100644
--- a/chrome/test/webdriver/commands/webdriver_command.cc
+++ b/chrome/test/webdriver/commands/webdriver_command.cc
@@ -34,7 +34,6 @@ bool WebDriverCommand::Init(Response* const response) {
return false;
}
- VLOG(1) << "Fetching session: " << session_id;
session_ = SessionManager::GetInstance()->GetSession(session_id);
if (session_ == NULL) {
response->SetError(
@@ -42,15 +41,17 @@ bool WebDriverCommand::Init(Response* const response) {
return false;
}
- // TODO(kkania): Do not use the standard automation timeout for this,
- // and throw an error if it does not succeed.
- scoped_ptr<Error> error(session_->WaitForAllTabsToStopLoading());
- if (error.get()) {
- LOG(WARNING) << error->ToString();
+ LOG(INFO) << "Waiting for the page to stop loading";
+ Error* error = session_->WaitForAllTabsToStopLoading();
+ if (error) {
+ response->SetError(error);
+ return false;
}
- error.reset(session_->SwitchToTopFrameIfCurrentFrameInvalid());
- if (error.get()) {
- LOG(WARNING) << error->ToString();
+ LOG(INFO) << "Done waiting for the page to stop loading";
+ error = session_->SwitchToTopFrameIfCurrentFrameInvalid();
+ if (error) {
+ response->SetError(error);
+ return false;
}
response->SetField("sessionId", Value::CreateStringValue(session_id));
« no previous file with comments | « chrome/test/webdriver/commands/create_session.cc ('k') | chrome/test/webdriver/dispatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698