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

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

Issue 174015: Add automation call to wait for multiple navigations. (Closed)
Patch Set: backwards compatibility, properly done Created 11 years, 4 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 // 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc ('k') | chrome/test/automated_ui_tests/automated_ui_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698