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

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

Issue 12226026: [ChromeDriver] Select the main frame if a non-existant child frame is targeted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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/chromedriver/session.h ('k') | chrome/test/chromedriver/session_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/session.cc
diff --git a/chrome/test/chromedriver/session.cc b/chrome/test/chromedriver/session.cc
index 5313e51654b523430bba774e74fb7610684c710c..7169ca6a50fcda730e72434209e84da5e2e837e3 100644
--- a/chrome/test/chromedriver/session.cc
+++ b/chrome/test/chromedriver/session.cc
@@ -5,6 +5,7 @@
#include "chrome/test/chromedriver/session.h"
#include "chrome/test/chromedriver/chrome.h"
+#include "chrome/test/chromedriver/status.h"
Session::Session(const std::string& id)
: id(id), mouse_position(0, 0), implicit_wait(0), page_load_timeout(0),
@@ -16,6 +17,18 @@ Session::Session(const std::string& id, scoped_ptr<Chrome> chrome)
Session::~Session() {}
+Status Session::WaitForPendingNavigations() {
+ if (!chrome)
+ return Status(kOk);
+ std::string full_frame_id(frame);
+ if (full_frame_id == "") {
+ Status status = chrome->GetMainFrame(&full_frame_id);
+ if (status.IsError())
+ return status;
+ }
+ return chrome->WaitForPendingNavigations(full_frame_id);
+}
+
SessionAccessorImpl::SessionAccessorImpl(scoped_ptr<Session> session)
: session_(session.Pass()) {}
« no previous file with comments | « chrome/test/chromedriver/session.h ('k') | chrome/test/chromedriver/session_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698