| OLD | NEW |
| 1 // Copyright (c) 2011 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 "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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 destination_point.Offset(-2 * dragged_tab_bounds.width() / 3, 0); | 212 destination_point.Offset(-2 * dragged_tab_bounds.width() / 3, 0); |
| 213 } | 213 } |
| 214 | 214 |
| 215 if (!browser->SimulateDrag(dragged_tab_point, destination_point, | 215 if (!browser->SimulateDrag(dragged_tab_point, destination_point, |
| 216 ui::EF_LEFT_MOUSE_BUTTON, false)) { | 216 ui::EF_LEFT_MOUSE_BUTTON, false)) { |
| 217 LogWarningMessage("failed_to_simulate_drag"); | 217 LogWarningMessage("failed_to_simulate_drag"); |
| 218 return false; | 218 return false; |
| 219 } | 219 } |
| 220 | 220 |
| 221 if (!browser->WaitForTabToBecomeActive(new_tab_index, | 221 if (!browser->WaitForTabToBecomeActive(new_tab_index, |
| 222 TestTimeouts::action_timeout_ms())) { | 222 TestTimeouts::action_timeout())) { |
| 223 LogWarningMessage("failed_to_reindex_tab"); | 223 LogWarningMessage("failed_to_reindex_tab"); |
| 224 return false; | 224 return false; |
| 225 } | 225 } |
| 226 | 226 |
| 227 return true; | 227 return true; |
| 228 } | 228 } |
| 229 | 229 |
| 230 bool AutomatedUITestBase::FindInPage() { | 230 bool AutomatedUITestBase::FindInPage() { |
| 231 if (!RunCommandAsync(IDC_FIND)) | 231 if (!RunCommandAsync(IDC_FIND)) |
| 232 return false; | 232 return false; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 386 |
| 387 scoped_refptr<WindowProxy> AutomatedUITestBase::GetAndActivateWindowForBrowser( | 387 scoped_refptr<WindowProxy> AutomatedUITestBase::GetAndActivateWindowForBrowser( |
| 388 BrowserProxy* browser) { | 388 BrowserProxy* browser) { |
| 389 if (!browser->BringToFront()) { | 389 if (!browser->BringToFront()) { |
| 390 LogWarningMessage("failed_to_bring_window_to_front"); | 390 LogWarningMessage("failed_to_bring_window_to_front"); |
| 391 return NULL; | 391 return NULL; |
| 392 } | 392 } |
| 393 | 393 |
| 394 return browser->GetWindow(); | 394 return browser->GetWindow(); |
| 395 } | 395 } |
| OLD | NEW |