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

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

Issue 6282002: Remove action_timeout_ms and fix all the callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/tab_restore_uitest.cc ('k') | chrome/test/ui/npapi_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/test_timeouts.h"
5 #include "chrome/app/chrome_command_ids.h" 6 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/browser/ui/view_ids.h" 7 #include "chrome/browser/ui/view_ids.h"
7 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" 8 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
8 #include "chrome/test/automation/browser_proxy.h" 9 #include "chrome/test/automation/browser_proxy.h"
9 #include "chrome/test/automation/tab_proxy.h" 10 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/automation/window_proxy.h" 11 #include "chrome/test/automation/window_proxy.h"
11 #include "chrome/test/ui/ui_test.h" 12 #include "chrome/test/ui/ui_test.h"
12 #include "gfx/point.h" 13 #include "gfx/point.h"
13 #include "gfx/rect.h" 14 #include "gfx/rect.h"
14 #include "views/event.h" 15 #include "views/event.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 new_tab_index = tab_index - 1; 206 new_tab_index = tab_index - 1;
206 destination_point.Offset(-2 * dragged_tab_bounds.width() / 3, 0); 207 destination_point.Offset(-2 * dragged_tab_bounds.width() / 3, 0);
207 } 208 }
208 209
209 if (!browser->SimulateDrag(dragged_tab_point, destination_point, 210 if (!browser->SimulateDrag(dragged_tab_point, destination_point,
210 views::Event::EF_LEFT_BUTTON_DOWN, false)) { 211 views::Event::EF_LEFT_BUTTON_DOWN, false)) {
211 LogWarningMessage("failed_to_simulate_drag"); 212 LogWarningMessage("failed_to_simulate_drag");
212 return false; 213 return false;
213 } 214 }
214 215
215 if (!browser->WaitForTabToBecomeActive(new_tab_index, action_timeout_ms())) { 216 if (!browser->WaitForTabToBecomeActive(new_tab_index,
217 TestTimeouts::action_timeout_ms())) {
216 LogWarningMessage("failed_to_reindex_tab"); 218 LogWarningMessage("failed_to_reindex_tab");
217 return false; 219 return false;
218 } 220 }
219 221
220 return true; 222 return true;
221 } 223 }
222 224
223 bool AutomatedUITestBase::FindInPage() { 225 bool AutomatedUITestBase::FindInPage() {
224 if (!RunCommandAsync(IDC_FIND)) 226 if (!RunCommandAsync(IDC_FIND))
225 return false; 227 return false;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 379
378 scoped_refptr<WindowProxy> AutomatedUITestBase::GetAndActivateWindowForBrowser( 380 scoped_refptr<WindowProxy> AutomatedUITestBase::GetAndActivateWindowForBrowser(
379 BrowserProxy* browser) { 381 BrowserProxy* browser) {
380 if (!browser->BringToFront()) { 382 if (!browser->BringToFront()) {
381 LogWarningMessage("failed_to_bring_window_to_front"); 383 LogWarningMessage("failed_to_bring_window_to_front");
382 return NULL; 384 return NULL;
383 } 385 }
384 386
385 return browser->GetWindow(); 387 return browser->GetWindow();
386 } 388 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_restore_uitest.cc ('k') | chrome/test/ui/npapi_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698