OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |