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

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

Issue 12978003: [chromedriver] Fix 3 bugs about web view, window handle and target window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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;

Powered by Google App Engine
This is Rietveld 408576698