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

Side by Side Diff: chrome/test/reliability/automated_ui_test_base.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/reliability/automated_ui_test_base.h" 5 #include "chrome/test/reliability/automated_ui_test_base.h"
6 6
7 #include "base/test/test_timeouts.h" 7 #include "base/test/test_timeouts.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/test/automation/automation_proxy.h" 10 #include "chrome/test/automation/automation_proxy.h"
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 void AutomatedUITestBase::LogWarningMessage(const std::string& warning) { 26 void AutomatedUITestBase::LogWarningMessage(const std::string& warning) {
27 } 27 }
28 28
29 void AutomatedUITestBase::LogInfoMessage(const std::string& info) { 29 void AutomatedUITestBase::LogInfoMessage(const std::string& info) {
30 } 30 }
31 31
32 void AutomatedUITestBase::SetUp() { 32 void AutomatedUITestBase::SetUp() {
33 UITest::SetUp(); 33 UITest::SetUp();
34 set_active_browser(automation()->GetBrowserWindow(0)); 34 set_active_browser(automation()->GetBrowserWindow(0).get());
35 } 35 }
36 36
37 bool AutomatedUITestBase::BackButton() { 37 bool AutomatedUITestBase::BackButton() {
38 return RunCommand(IDC_BACK); 38 return RunCommand(IDC_BACK);
39 } 39 }
40 40
41 bool AutomatedUITestBase::CloseActiveTab() { 41 bool AutomatedUITestBase::CloseActiveTab() {
42 BrowserProxy* browser = active_browser(); 42 BrowserProxy* browser = active_browser();
43 int tab_count; 43 int tab_count;
44 if (!browser->GetTabCount(&tab_count)) { 44 if (!browser->GetTabCount(&tab_count)) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 scoped_refptr<WindowProxy> AutomatedUITestBase::GetAndActivateWindowForBrowser( 226 scoped_refptr<WindowProxy> AutomatedUITestBase::GetAndActivateWindowForBrowser(
227 BrowserProxy* browser) { 227 BrowserProxy* browser) {
228 if (!browser->BringToFront()) { 228 if (!browser->BringToFront()) {
229 LogWarningMessage("failed_to_bring_window_to_front"); 229 LogWarningMessage("failed_to_bring_window_to_front");
230 return NULL; 230 return NULL;
231 } 231 }
232 232
233 return browser->GetWindow(); 233 return browser->GetWindow();
234 } 234 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc ('k') | chrome/test/reliability/automated_ui_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698