Index: chrome/test/chromedriver/commands.cc |
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc |
index 6cef527a7955083fe4925639edb28e4df22bc5f1..885283d1a8046cf550181495633cfe6ff3c9315b 100644 |
--- a/chrome/test/chromedriver/commands.cc |
+++ b/chrome/test/chromedriver/commands.cc |
@@ -118,20 +118,19 @@ Status ExecuteNewSession( |
if (status.IsError()) |
return Status(kSessionNotCreatedException, status.message()); |
- std::list<WebView*> web_views; |
- status = chrome->GetWebViews(&web_views); |
- if (status.IsError() || web_views.empty()) { |
+ std::list<std::string> web_view_ids; |
+ status = chrome->GetWebViewIds(&web_view_ids); |
+ if (status.IsError() || web_view_ids.empty()) { |
chrome->Quit(); |
return status.IsError() ? status : |
Status(kUnknownError, "unable to discover open window in chrome"); |
} |
- WebView* default_web_view = web_views.front(); |
std::string new_id = session_id; |
if (new_id.empty()) |
new_id = GenerateId(); |
scoped_ptr<Session> session(new Session(new_id, chrome.Pass())); |
- session->window = default_web_view->GetId(); |
+ session->window = web_view_ids.front(); |
out_value->reset(session->capabilities->DeepCopy()); |
*out_session_id = new_id; |