OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/gfx/point.h" | 5 #include "base/gfx/point.h" |
6 #include "base/gfx/rect.h" | 6 #include "base/gfx/rect.h" |
7 #include "chrome/app/chrome_dll_resource.h" | 7 #include "chrome/app/chrome_dll_resource.h" |
8 #include "chrome/browser/view_ids.h" | 8 #include "chrome/browser/view_ids.h" |
9 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" | 9 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" |
10 #include "chrome/test/automation/browser_proxy.h" | 10 #include "chrome/test/automation/browser_proxy.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 bool AutomatedUITestBase::GoOffTheRecord() { | 254 bool AutomatedUITestBase::GoOffTheRecord() { |
255 return RunCommand(IDC_NEW_INCOGNITO_WINDOW); | 255 return RunCommand(IDC_NEW_INCOGNITO_WINDOW); |
256 } | 256 } |
257 | 257 |
258 bool AutomatedUITestBase::Home() { | 258 bool AutomatedUITestBase::Home() { |
259 return RunCommand(IDC_HOME); | 259 return RunCommand(IDC_HOME); |
260 } | 260 } |
261 | 261 |
262 bool AutomatedUITestBase::OpenAndActivateNewBrowserWindow( | 262 bool AutomatedUITestBase::OpenAndActivateNewBrowserWindow( |
263 scoped_refptr<BrowserProxy>* previous_browser) { | 263 scoped_refptr<BrowserProxy>* previous_browser) { |
264 if (!automation()->OpenNewBrowserWindow(BrowserProxy::TYPE_NORMAL, | 264 if (!automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, |
265 true /* SW_SHOWNORMAL */)) { | 265 true /* SW_SHOWNORMAL */)) { |
266 LogWarningMessage("failed_to_open_new_browser_window"); | 266 LogWarningMessage("failed_to_open_new_browser_window"); |
267 return false; | 267 return false; |
268 } | 268 } |
269 int num_browser_windows; | 269 int num_browser_windows; |
270 if (!automation()->GetBrowserWindowCount(&num_browser_windows)) { | 270 if (!automation()->GetBrowserWindowCount(&num_browser_windows)) { |
271 LogErrorMessage("failed_to_get_browser_window_count"); | 271 LogErrorMessage("failed_to_get_browser_window_count"); |
272 return false; | 272 return false; |
273 } | 273 } |
274 // Get the most recently opened browser window and activate the tab | 274 // Get the most recently opened browser window and activate the tab |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 BrowserProxy* browser) { | 410 BrowserProxy* browser) { |
411 bool did_timeout; | 411 bool did_timeout; |
412 if (!browser->BringToFrontWithTimeout(action_max_timeout_ms(), | 412 if (!browser->BringToFrontWithTimeout(action_max_timeout_ms(), |
413 &did_timeout)) { | 413 &did_timeout)) { |
414 LogWarningMessage("failed_to_bring_window_to_front"); | 414 LogWarningMessage("failed_to_bring_window_to_front"); |
415 return NULL; | 415 return NULL; |
416 } | 416 } |
417 | 417 |
418 return browser->GetWindow(); | 418 return browser->GetWindow(); |
419 } | 419 } |
OLD | NEW |