| 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()) {}
|
|
|
|
|