| Index: chrome/test/chromedriver/session.cc
|
| diff --git a/chrome/test/chromedriver/session.cc b/chrome/test/chromedriver/session.cc
|
| index 996b205a127edf8fc9e066212cf939b4c50f9a7e..7358d6792c35c43cc3f745a4e64ff9452baecc01 100644
|
| --- a/chrome/test/chromedriver/session.cc
|
| +++ b/chrome/test/chromedriver/session.cc
|
| @@ -43,19 +43,10 @@ Status Session::GetTargetWindow(WebView** web_view) {
|
| if (!chrome)
|
| return Status(kNoSuchWindow, "no chrome started in this session");
|
|
|
| - std::list<WebView*> web_views;
|
| - Status status = chrome->GetWebViews(&web_views);
|
| + Status status = chrome->GetWebViewById(window, web_view);
|
| if (status.IsError())
|
| - return status;
|
| -
|
| - for (std::list<WebView*>::const_iterator it = web_views.begin();
|
| - it != web_views.end(); ++it) {
|
| - if ((*it)->GetId() == window) {
|
| - *web_view = *it;
|
| - return Status(kOk);
|
| - }
|
| - }
|
| - return Status(kNoSuchWindow, "target window already closed");
|
| + status = Status(kNoSuchWindow, "target window already closed", status);
|
| + return status;
|
| }
|
|
|
| void Session::SwitchToTopFrame() {
|
|
|