| 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 "chrome/app/chrome_dll_resource.h" | 5 #include "chrome/app/chrome_dll_resource.h" |
| 6 #include "chrome/browser/view_ids.h" | 6 #include "chrome/browser/view_ids.h" |
| 7 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" | 7 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" |
| 8 #include "chrome/test/automation/browser_proxy.h" | 8 #include "chrome/test/automation/browser_proxy.h" |
| 9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
| 10 #include "chrome/test/automation/window_proxy.h" | 10 #include "chrome/test/automation/window_proxy.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 } | 285 } |
| 286 | 286 |
| 287 bool AutomatedUITestBase::Navigate(const GURL& url) { | 287 bool AutomatedUITestBase::Navigate(const GURL& url) { |
| 288 scoped_refptr<TabProxy> tab(GetActiveTab()); | 288 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 289 if (tab.get() == NULL) { | 289 if (tab.get() == NULL) { |
| 290 LogErrorMessage("active_tab_not_found"); | 290 LogErrorMessage("active_tab_not_found"); |
| 291 return false; | 291 return false; |
| 292 } | 292 } |
| 293 bool did_timeout = false; | 293 bool did_timeout = false; |
| 294 tab->NavigateToURLWithTimeout(url, | 294 tab->NavigateToURLWithTimeout(url, |
| 295 1, |
| 295 command_execution_timeout_ms(), | 296 command_execution_timeout_ms(), |
| 296 &did_timeout); | 297 &did_timeout); |
| 297 | 298 |
| 298 if (did_timeout) { | 299 if (did_timeout) { |
| 299 LogWarningMessage("timeout"); | 300 LogWarningMessage("timeout"); |
| 300 return false; | 301 return false; |
| 301 } | 302 } |
| 302 return true; | 303 return true; |
| 303 } | 304 } |
| 304 | 305 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 BrowserProxy* browser) { | 364 BrowserProxy* browser) { |
| 364 bool did_timeout; | 365 bool did_timeout; |
| 365 if (!browser->BringToFrontWithTimeout(action_max_timeout_ms(), | 366 if (!browser->BringToFrontWithTimeout(action_max_timeout_ms(), |
| 366 &did_timeout)) { | 367 &did_timeout)) { |
| 367 LogWarningMessage("failed_to_bring_window_to_front"); | 368 LogWarningMessage("failed_to_bring_window_to_front"); |
| 368 return NULL; | 369 return NULL; |
| 369 } | 370 } |
| 370 | 371 |
| 371 return browser->GetWindow(); | 372 return browser->GetWindow(); |
| 372 } | 373 } |
| OLD | NEW |