| Index: chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc
|
| diff --git a/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc b/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc
|
| index df4d33df934eb0bfc58dbd32534b82b928919d4a..fad3deaffdf894e3a56d8927af10c38ddd391a7a 100644
|
| --- a/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc
|
| +++ b/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc
|
| @@ -1,7 +1,8 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "base/test/test_timeouts.h"
|
| #include "base/threading/platform_thread.h"
|
| #include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
|
| #include "chrome/test/automation/browser_proxy.h"
|
| @@ -12,7 +13,7 @@ TEST_F(AutomatedUITestBase, DragOut) {
|
| NewTab();
|
| NewTab();
|
| ASSERT_TRUE(active_browser()->WaitForTabCountToBecome(3));
|
| - base::PlatformThread::Sleep(sleep_timeout_ms());
|
| + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
|
| ASSERT_TRUE(DragTabOut());
|
| int window_count;
|
| ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count));
|
| @@ -25,7 +26,7 @@ TEST_F(AutomatedUITestBase, DragLeftRight) {
|
| ASSERT_TRUE(active_browser()->WaitForTabCountToBecome(3));
|
| // TODO(phajdan.jr): We need a WaitForTabstripAnimationsToEnd() function.
|
| // Every sleep in this file should be replaced with it.
|
| - base::PlatformThread::Sleep(sleep_timeout_ms());
|
| + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
|
|
|
| scoped_refptr<TabProxy> dragged_tab(active_browser()->GetActiveTab());
|
| int tab_index;
|
| @@ -35,13 +36,13 @@ TEST_F(AutomatedUITestBase, DragLeftRight) {
|
| // Drag the active tab to left. Now it should be the middle tab.
|
| ASSERT_TRUE(DragActiveTab(false));
|
| // We wait for the animation to be over.
|
| - base::PlatformThread::Sleep(sleep_timeout_ms());
|
| + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
|
| ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index));
|
| EXPECT_EQ(1, tab_index);
|
|
|
| // Drag the active tab to left. Now it should be the leftmost tab.
|
| ASSERT_TRUE(DragActiveTab(false));
|
| - base::PlatformThread::Sleep(sleep_timeout_ms());
|
| + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
|
| ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index));
|
| EXPECT_EQ(0, tab_index);
|
|
|
| @@ -51,13 +52,13 @@ TEST_F(AutomatedUITestBase, DragLeftRight) {
|
|
|
| // Drag the active tab to right. Now it should be the middle tab.
|
| ASSERT_TRUE(DragActiveTab(true));
|
| - base::PlatformThread::Sleep(sleep_timeout_ms());
|
| + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
|
| ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index));
|
| EXPECT_EQ(1, tab_index);
|
|
|
| // Drag the active tab to right. Now it should be the rightmost tab.
|
| ASSERT_TRUE(DragActiveTab(true));
|
| - base::PlatformThread::Sleep(sleep_timeout_ms());
|
| + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
|
| ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index));
|
| EXPECT_EQ(2, tab_index);
|
|
|
|
|