From 71accd2178fae1ab9b070c823c6f280788952425 Mon Sep 17 00:00:00 2001 From: "bustamante@chromium.org" Date: Fri, 27 Dec 2013 02:20:16 +0000 Subject: [PATCH] Returning kApp window handles in GetWebViewIds to make them discoverable Previously this change caused some tests to fail but should be fixed now with https://chromiumcodereview.appspot.com/113673003/ BUG= Review URL: https://codereview.chromium.org/115243009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242587 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/chromedriver/chrome/chrome_impl.cc | 2 +- chrome/test/chromedriver/chrome_launcher.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/test/chromedriver/chrome/chrome_impl.cc b/chrome/test/chromedriver/chrome/chrome_impl.cc index f293899e15b4..7f01e178e320 100644 --- a/chrome/test/chromedriver/chrome/chrome_impl.cc +++ b/chrome/test/chromedriver/chrome/chrome_impl.cc @@ -56,7 +56,7 @@ Status ChromeImpl::GetWebViewIds(std::list* web_view_ids) { // Check for newly-opened web views. for (size_t i = 0; i < views_info.GetSize(); ++i) { const WebViewInfo& view = views_info.Get(i); - if (view.type != WebViewInfo::kPage) + if (view.type != WebViewInfo::kPage && view.type != WebViewInfo::kApp) continue; bool found = false; diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc index d293d43da5bb..354e1e657a85 100644 --- a/chrome/test/chromedriver/chrome_launcher.cc +++ b/chrome/test/chromedriver/chrome_launcher.cc @@ -173,7 +173,8 @@ Status WaitForDevToolsAndCheckVersion( WebViewsInfo views_info; client->GetWebViewsInfo(&views_info); for (size_t i = 0; i < views_info.GetSize(); ++i) { - if (views_info.Get(i).type == WebViewInfo::kPage) { + if (views_info.Get(i).type == WebViewInfo::kPage || + views_info.Get(i).type == WebViewInfo::kApp) { *user_client = client.Pass(); return Status(kOk); } -- 2.11.4.GIT