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

Side by Side Diff: chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The Chromium Authors. All rights reserved. 2 * Copyright 2013 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 #include "chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h" 6 #include "chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h"
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 aura::Window* window = ash::Shell::GetPrimaryRootWindow(); 89 aura::Window* window = ash::Shell::GetPrimaryRootWindow();
90 ui::InputMethod* input_method = window->GetHost()->GetInputMethod(); 90 ui::InputMethod* input_method = window->GetHost()->GetInputMethod();
91 ASSERT_TRUE(input_method); 91 ASSERT_TRUE(input_method);
92 input_method->ShowImeIfNeeded(); 92 input_method->ShowImeIfNeeded();
93 } 93 }
94 94
95 content::RenderViewHost* VirtualKeyboardBrowserTest::GetKeyboardRenderViewHost( 95 content::RenderViewHost* VirtualKeyboardBrowserTest::GetKeyboardRenderViewHost(
96 const std::string& id) { 96 const std::string& id) {
97 ShowVirtualKeyboard(); 97 ShowVirtualKeyboard();
98 GURL url = extensions::Extension::GetBaseURLFromExtensionId(id); 98 GURL url = extensions::Extension::GetBaseURLFromExtensionId(id);
99 scoped_ptr<content::RenderWidgetHostIterator> widgets( 99 std::unique_ptr<content::RenderWidgetHostIterator> widgets(
100 content::RenderWidgetHost::GetRenderWidgetHosts()); 100 content::RenderWidgetHost::GetRenderWidgetHosts());
101 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { 101 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) {
102 content::RenderViewHost* view = content::RenderViewHost::From(widget); 102 content::RenderViewHost* view = content::RenderViewHost::From(widget);
103 if (view && url == view->GetSiteInstance()->GetSiteURL()) { 103 if (view && url == view->GetSiteInstance()->GetSiteURL()) {
104 content::WebContents* wc = content::WebContents::FromRenderViewHost(view); 104 content::WebContents* wc = content::WebContents::FromRenderViewHost(view);
105 // Waits for virtual keyboard to load. 105 // Waits for virtual keyboard to load.
106 EXPECT_TRUE(content::WaitForLoadStop(wc)); 106 EXPECT_TRUE(content::WaitForLoadStop(wc));
107 return view; 107 return view;
108 } 108 }
109 } 109 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 bool success = false; 184 bool success = false;
185 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 185 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
186 browser_rvh, 186 browser_rvh,
187 "success ? verifyInput('a') : waitForInput('a');", 187 "success ? verifyInput('a') : waitForInput('a');",
188 &success)); 188 &success));
189 ASSERT_TRUE(success); 189 ASSERT_TRUE(success);
190 } 190 }
191 191
192 // TODO(kevers|rsadam|bshe): Add UI tests for remaining virtual keyboard 192 // TODO(kevers|rsadam|bshe): Add UI tests for remaining virtual keyboard
193 // functionality. 193 // functionality.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698