Commit 2a42e0ea authored by tfarina@chromium.org's avatar tfarina@chromium.org

Remove action_timeout_ms and fix all the callers.

(This was a TODO for phajdan.jr).

BUG=None
TEST=trybots

Review URL: http://codereview.chromium.org/6282002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71558 0039d316-1c4b-4281-b951-d872f2087c98
parent 55327767
......@@ -146,7 +146,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessSuccess) {
int original_tab_count = GetTabCount();
EXPECT_EQ(ProcessSingleton::PROCESS_NOTIFIED,
NotifyOtherProcess(url, action_timeout_ms()));
NotifyOtherProcess(url, TestTimeouts::action_timeout_ms()));
EXPECT_EQ(original_tab_count + 1, GetTabCount());
EXPECT_EQ(url, GetActiveTabURL().spec());
}
......@@ -167,7 +167,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessFailure) {
std::string url("about:blank");
EXPECT_EQ(ProcessSingleton::PROCESS_NONE,
NotifyOtherProcess(url, action_timeout_ms()));
NotifyOtherProcess(url, TestTimeouts::action_timeout_ms()));
// Wait for a while to make sure the browser process is actually killed.
EXPECT_FALSE(CrashAwareSleep(TestTimeouts::action_timeout_ms()));
......@@ -195,7 +195,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessNoSuicide) {
std::string url("about:blank");
EXPECT_EQ(ProcessSingleton::PROCESS_NONE,
NotifyOtherProcess(url, action_timeout_ms()));
NotifyOtherProcess(url, TestTimeouts::action_timeout_ms()));
// If we've gotten to this point without killing ourself, the test succeeded.
}
......@@ -209,7 +209,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessHostChanged) {
std::string url("about:blank");
EXPECT_EQ(ProcessSingleton::PROCESS_NOTIFIED,
NotifyOtherProcess(url, action_timeout_ms()));
NotifyOtherProcess(url, TestTimeouts::action_timeout_ms()));
EXPECT_EQ(original_tab_count + 1, GetTabCount());
EXPECT_EQ(url, GetActiveTabURL().spec());
}
......@@ -231,7 +231,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessDifferingHost) {
std::string url("about:blank");
EXPECT_EQ(ProcessSingleton::PROFILE_IN_USE,
NotifyOtherProcess(url, action_timeout_ms()));
NotifyOtherProcess(url, TestTimeouts::action_timeout_ms()));
ASSERT_EQ(0, unlink(lock_path_.value().c_str()));
}
......@@ -253,7 +253,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessOrCreate_DifferingHost) {
std::string url("about:blank");
EXPECT_EQ(ProcessSingleton::PROFILE_IN_USE,
NotifyOtherProcessOrCreate(url, action_timeout_ms()));
NotifyOtherProcessOrCreate(url, TestTimeouts::action_timeout_ms()));
ASSERT_EQ(0, unlink(lock_path_.value().c_str()));
}
......@@ -295,5 +295,5 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessOrCreate_BadCookie) {
std::string url("about:blank");
EXPECT_EQ(ProcessSingleton::PROFILE_IN_USE,
NotifyOtherProcessOrCreate(url, action_timeout_ms()));
NotifyOtherProcessOrCreate(url, TestTimeouts::action_timeout_ms()));
}
// 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/basictypes.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/test/test_timeouts.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
......@@ -598,14 +599,16 @@ TEST_F(TabRestoreUITest, MAYBE_RestoreWindow) {
scoped_refptr<TabProxy> restored_tab_proxy(
browser_proxy->GetTab(initial_tab_count));
ASSERT_TRUE(restored_tab_proxy.get());
ASSERT_TRUE(restored_tab_proxy->WaitForTabToBeRestored(action_timeout_ms()));
ASSERT_TRUE(restored_tab_proxy->WaitForTabToBeRestored(
TestTimeouts::action_timeout_ms()));
GURL url;
ASSERT_TRUE(restored_tab_proxy->GetCurrentURL(&url));
EXPECT_TRUE(url == url1_);
restored_tab_proxy = browser_proxy->GetTab(initial_tab_count + 1);
ASSERT_TRUE(restored_tab_proxy.get());
ASSERT_TRUE(restored_tab_proxy->WaitForTabToBeRestored(action_timeout_ms()));
ASSERT_TRUE(restored_tab_proxy->WaitForTabToBeRestored(
TestTimeouts::action_timeout_ms()));
ASSERT_TRUE(restored_tab_proxy->GetCurrentURL(&url));
EXPECT_TRUE(url == url2_);
}
......@@ -630,7 +633,7 @@ TEST_F(TabRestoreUITest, RestoreTabWithSpecialURL) {
RestoreTab(0, 1);
tab = browser->GetTab(1);
ASSERT_TRUE(tab.get());
ASSERT_TRUE(tab->WaitForTabToBeRestored(action_timeout_ms()));
ASSERT_TRUE(tab->WaitForTabToBeRestored(TestTimeouts::action_timeout_ms()));
// See if content is as expected.
EXPECT_TRUE(tab->FindInPage(std::wstring(L"webkit"), FWD, IGNORE_CASE, false,
......@@ -666,7 +669,7 @@ TEST_F(TabRestoreUITest, RestoreTabWithSpecialURLOnBack) {
RestoreTab(0, 1);
tab = browser->GetTab(1);
ASSERT_TRUE(tab.get());
ASSERT_TRUE(tab->WaitForTabToBeRestored(action_timeout_ms()));
ASSERT_TRUE(tab->WaitForTabToBeRestored(TestTimeouts::action_timeout_ms()));
GURL url;
ASSERT_TRUE(tab->GetCurrentURL(&url));
ASSERT_EQ(http_url, url);
......
// 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/test/test_timeouts.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
......@@ -212,7 +213,8 @@ bool AutomatedUITestBase::DragActiveTab(bool drag_right) {
return false;
}
if (!browser->WaitForTabToBecomeActive(new_tab_index, action_timeout_ms())) {
if (!browser->WaitForTabToBecomeActive(new_tab_index,
TestTimeouts::action_timeout_ms())) {
LogWarningMessage("failed_to_reindex_tab");
return false;
}
......
// 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.
......@@ -21,6 +21,7 @@
#include "base/file_path.h"
#include "base/string_number_conversions.h"
#include "base/test/test_timeouts.h"
#include "chrome/browser/net/url_request_mock_http_job.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
......@@ -252,7 +253,7 @@ TEST_F(NPAPIVisiblePluginTester, FLAKY_OpenPopupWindowWithPlugin) {
ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
WaitForFinish("plugin_popup_with_plugin_target", "1", url,
kTestCompleteCookie, kTestCompleteSuccess,
action_timeout_ms());
TestTimeouts::action_timeout_ms());
}
// Test checking the privacy mode is off.
......
......@@ -246,9 +246,6 @@ class UITestBase {
static int command_execution_timeout_ms() {
return TestTimeouts::command_execution_timeout_ms();
}
static int action_timeout_ms() {
return TestTimeouts::action_timeout_ms();
}
static int action_max_timeout_ms() {
return TestTimeouts::action_max_timeout_ms();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment