diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 22:37:31 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 22:37:31 +0000 |
commit | d64295933cbfd3bc984e851412cc79c8a0870acf (patch) | |
tree | 8026b726dc498f4fa6f3e886b1612541ac6f0214 /chrome/test/interactive_ui | |
parent | 4f2063cce10295e8b982e98d466c9130d754a540 (diff) | |
download | chromium_src-d64295933cbfd3bc984e851412cc79c8a0870acf.zip chromium_src-d64295933cbfd3bc984e851412cc79c8a0870acf.tar.gz chromium_src-d64295933cbfd3bc984e851412cc79c8a0870acf.tar.bz2 |
Remove action_max_timeout_ms and fix all the callers.
(This was a TODO for phajdan.jr).
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/6354005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/interactive_ui')
-rw-r--r-- | chrome/test/interactive_ui/keyboard_access_uitest.cc | 6 | ||||
-rw-r--r-- | chrome/test/interactive_ui/mouseleave_interactive_uitest.cc | 14 | ||||
-rw-r--r-- | chrome/test/interactive_ui/npapi_interactive_test.cc | 9 |
3 files changed, 16 insertions, 13 deletions
diff --git a/chrome/test/interactive_ui/keyboard_access_uitest.cc b/chrome/test/interactive_ui/keyboard_access_uitest.cc index fe80efc..7e7b156 100644 --- a/chrome/test/interactive_ui/keyboard_access_uitest.cc +++ b/chrome/test/interactive_ui/keyboard_access_uitest.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 "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" @@ -154,7 +155,8 @@ TEST_F(KeyboardAccessTest, MAYBE_ReserveKeyboardAccelerators) { ASSERT_TRUE(window); ASSERT_TRUE(window->SimulateOSKeyPress( ui::VKEY_TAB, views::Event::EF_CONTROL_DOWN)); - ASSERT_TRUE(browser->WaitForTabToBecomeActive(0, action_max_timeout_ms())); + ASSERT_TRUE(browser->WaitForTabToBecomeActive( + 0, TestTimeouts::action_max_timeout_ms())); #if !defined(OS_MACOSX) // see BrowserWindowCocoa::GetCommandId ASSERT_TRUE(browser->ActivateTab(1)); diff --git a/chrome/test/interactive_ui/mouseleave_interactive_uitest.cc b/chrome/test/interactive_ui/mouseleave_interactive_uitest.cc index 627e25e..2383d5b 100644 --- a/chrome/test/interactive_ui/mouseleave_interactive_uitest.cc +++ b/chrome/test/interactive_ui/mouseleave_interactive_uitest.cc @@ -1,8 +1,9 @@ -// Copyright (c) 2009 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/file_path.h" +#include "base/test/test_timeouts.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" @@ -58,12 +59,11 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) { // Navigate to the test html page. ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url)); - const int timeout_ms = 5 * action_max_timeout_ms(); - // Wait for the onload() handler to complete so we can do the // next part of the test. ASSERT_TRUE(WaitUntilCookieValue( - tab.get(), test_url, "__state", timeout_ms, "initial")); + tab.get(), test_url, "__state", + TestTimeouts::large_test_timeout_ms(), "initial")); // Move the cursor to the top-center of the content, which will trigger // a javascript onMouseOver event. @@ -71,7 +71,8 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) { // Wait on the correct intermediate value of the cookie. ASSERT_TRUE(WaitUntilCookieValue( - tab.get(), test_url, "__state", timeout_ms, "initial,entered")); + tab.get(), test_url, "__state", + TestTimeouts::large_test_timeout_ms(), "initial,entered")); // Move the cursor above the content again, which should trigger // a javascript onMouseOut event. @@ -79,7 +80,8 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) { // Wait on the correct final value of the cookie. ASSERT_TRUE(WaitUntilCookieValue( - tab.get(), test_url, "__state", timeout_ms, "initial,entered,left")); + tab.get(), test_url, "__state", + TestTimeouts::large_test_timeout_ms(), "initial,entered,left")); } } // namespace diff --git a/chrome/test/interactive_ui/npapi_interactive_test.cc b/chrome/test/interactive_ui/npapi_interactive_test.cc index 725e3a1..5d2204c 100644 --- a/chrome/test/interactive_ui/npapi_interactive_test.cc +++ b/chrome/test/interactive_ui/npapi_interactive_test.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// // NPAPI interactive UI tests. -// #include "base/file_path.h" +#include "base/test/test_timeouts.h" #include "chrome/browser/net/url_request_mock_http_job.h" #include "chrome/test/automation/window_proxy.h" #include "chrome/test/ui/npapi_test_helper.h" @@ -37,7 +36,7 @@ TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { WaitForFinish("execute_script_delete_in_mouse_move", "1", url, kTestCompleteCookie, kTestCompleteSuccess, - action_max_timeout_ms()); + TestTimeouts::action_max_timeout_ms()); } // Flaky, http://crbug.com/60071. @@ -58,7 +57,7 @@ TEST_F(NPAPIVisiblePluginTester, FLAKY_GetURLRequest404Response) { ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_ESCAPE, 0)); WaitForFinish("geturl_404_response", "1", url, kTestCompleteCookie, - kTestCompleteSuccess, action_max_timeout_ms()); + kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); } // Tests if a plugin executing a self deleting script using Invoke with @@ -78,5 +77,5 @@ TEST_F(NPAPIVisiblePluginTester, DISABLED_SelfDeletePluginInvokeAlert) { WaitForFinish("self_delete_plugin_invoke_alert", "1", url, kTestCompleteCookie, kTestCompleteSuccess, - action_max_timeout_ms()); + TestTimeouts::action_max_timeout_ms()); } |