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

Unified Diff: chrome/test/chromedriver/session.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/run_py_tests.py ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/session.cc
diff --git a/chrome/test/chromedriver/session.cc b/chrome/test/chromedriver/session.cc
index 9ba11e3e69cc31351c41ac6c2b2f7001e1d130a0..79092276fe0a55b12c015fe6a0152c6185c9e86c 100644
--- a/chrome/test/chromedriver/session.cc
+++ b/chrome/test/chromedriver/session.cc
@@ -45,19 +45,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() {
« no previous file with comments | « chrome/test/chromedriver/run_py_tests.py ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698