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

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: Rebase. 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
« no previous file with comments | « chrome/test/chromedriver/chrome/stub_chrome.cc ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/commands.cc
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc
index b36cabda521cbb664007944ae24ea5ab862a934c..d6ccc8f8ad634377776b5d2fd481dc6bcb6d36bd 100644
--- a/chrome/test/chromedriver/commands.cc
+++ b/chrome/test/chromedriver/commands.cc
@@ -118,14 +118,13 @@ 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())
@@ -136,7 +135,7 @@ Status ExecuteNewSession(
return Status(kUnknownError,
"failed to start a thread for the new session");
}
- session->window = default_web_view->GetId();
+ session->window = web_view_ids.front();
out_value->reset(session->capabilities->DeepCopy());
*out_session_id = new_id;
« no previous file with comments | « chrome/test/chromedriver/chrome/stub_chrome.cc ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698