diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 12:02:45 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 12:02:45 +0000 |
commit | ef6200adcf7b7e10a1d3bc221ea6135a34133010 (patch) | |
tree | 5360d6741dfdb4e9e4a0c180df4d7e84b4bdcf10 /chrome | |
parent | dec720ec4bef489c3ada09f0cf075def343098bc (diff) | |
download | chromium_src-ef6200adcf7b7e10a1d3bc221ea6135a34133010.zip chromium_src-ef6200adcf7b7e10a1d3bc221ea6135a34133010.tar.gz chromium_src-ef6200adcf7b7e10a1d3bc221ea6135a34133010.tar.bz2 |
Remove test_timeout_ms and fix all the callers.
(This was a TODO for phajdan.jr).
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/6188004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/dom_ui/bookmarks_ui_uitest.cc | 5 | ||||
-rw-r--r-- | chrome/test/page_cycler/page_cycler_test.cc | 8 | ||||
-rw-r--r-- | chrome/test/selenium/selenium_test.cc | 8 | ||||
-rw-r--r-- | chrome/test/ui/dom_checker_uitest.cc | 5 | ||||
-rw-r--r-- | chrome/test/ui/dromaeo_benchmark_uitest.cc | 5 | ||||
-rw-r--r-- | chrome/test/ui/sunspider_uitest.cc | 5 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.h | 5 | ||||
-rw-r--r-- | chrome/test/ui/v8_benchmark_uitest.cc | 5 | ||||
-rw-r--r-- | chrome/test/url_fetch_test/url_fetch_test.cc | 13 |
9 files changed, 34 insertions, 25 deletions
diff --git a/chrome/browser/dom_ui/bookmarks_ui_uitest.cc b/chrome/browser/dom_ui/bookmarks_ui_uitest.cc index 304c9ac..6b6ce8b 100644 --- a/chrome/browser/dom_ui/bookmarks_ui_uitest.cc +++ b/chrome/browser/dom_ui/bookmarks_ui_uitest.cc @@ -1,9 +1,10 @@ -// 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 "chrome/test/ui/ui_test.h" +#include "base/test/test_timeouts.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/common/url_constants.h" #include "chrome/test/automation/browser_proxy.h" @@ -21,7 +22,7 @@ class BookmarksUITest : public UITest { L"domAutomationController.send(" L" location.protocol == 'chrome-extension:' && " L" document.readyState == 'complete')", - test_timeout_ms()); + TestTimeouts::huge_test_timeout_ms()); } scoped_refptr<TabProxy> GetBookmarksUITab() { diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc index 6dce15e..f86d175 100644 --- a/chrome/test/page_cycler/page_cycler_test.cc +++ b/chrome/test/page_cycler/page_cycler_test.cc @@ -1,4 +1,4 @@ -// 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. @@ -10,6 +10,7 @@ #include "base/process_util.h" #include "base/string_number_conversions.h" #include "base/sys_string_conversions.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/common/chrome_constants.h" @@ -239,8 +240,9 @@ class PageCyclerTest : public UIPerfTest { ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url)); // Wait for the test to finish. - ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__pc_done", - UITest::test_timeout_ms(), "1")); + ASSERT_TRUE(WaitUntilCookieValue( + tab.get(), test_url, "__pc_done", + TestTimeouts::huge_test_timeout_ms(), "1")); std::string cookie; ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); diff --git a/chrome/test/selenium/selenium_test.cc b/chrome/test/selenium/selenium_test.cc index 071272d..fa173bb 100644 --- a/chrome/test/selenium/selenium_test.cc +++ b/chrome/test/selenium/selenium_test.cc @@ -1,4 +1,4 @@ -// 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. @@ -17,6 +17,7 @@ #include "base/path_service.h" #include "base/string_split.h" #include "base/string_util.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/tab_proxy.h" @@ -111,8 +112,9 @@ class SeleniumTest : public UITest { tab->NavigateToURL(test_url); // Wait for the test to finish. - ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__tests_finished", - UITest::test_timeout_ms(), "1")); + ASSERT_TRUE(WaitUntilCookieValue( + tab.get(), test_url, "__tests_finished", + TestTimeouts::huge_test_timeout_ms(), "1")); std::string cookie; ASSERT_TRUE(tab->GetCookieByName(test_url, "__num_tests_total", &cookie)); diff --git a/chrome/test/ui/dom_checker_uitest.cc b/chrome/test/ui/dom_checker_uitest.cc index f299958..458b847 100644 --- a/chrome/test/ui/dom_checker_uitest.cc +++ b/chrome/test/ui/dom_checker_uitest.cc @@ -1,4 +1,4 @@ -// 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. @@ -9,6 +9,7 @@ #include "base/scoped_ptr.h" #include "base/string_split.h" #include "base/string_util.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/chrome_paths.h" @@ -144,7 +145,7 @@ class DomCheckerTest : public UITest { bool WaitUntilTestCompletes(TabProxy* tab) { return WaitUntilJavaScriptCondition(tab, L"", L"window.domAutomationController.send(automation.IsDone());", - UITest::test_timeout_ms()); + TestTimeouts::huge_test_timeout_ms()); } bool GetTestCount(TabProxy* tab, int* test_count) { diff --git a/chrome/test/ui/dromaeo_benchmark_uitest.cc b/chrome/test/ui/dromaeo_benchmark_uitest.cc index 67864c3..684f695 100644 --- a/chrome/test/ui/dromaeo_benchmark_uitest.cc +++ b/chrome/test/ui/dromaeo_benchmark_uitest.cc @@ -1,4 +1,4 @@ -// 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. @@ -7,6 +7,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/chrome_paths.h" @@ -60,7 +61,7 @@ class DromaeoTest : public UIPerfTest { bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) { return WaitUntilCookieValue(tab, test_url, "__done", - UITest::test_timeout_ms(), "1"); + TestTimeouts::huge_test_timeout_ms(), "1"); } bool GetScore(TabProxy* tab, std::string* score) { diff --git a/chrome/test/ui/sunspider_uitest.cc b/chrome/test/ui/sunspider_uitest.cc index fe66599..bcc8ff6 100644 --- a/chrome/test/ui/sunspider_uitest.cc +++ b/chrome/test/ui/sunspider_uitest.cc @@ -1,4 +1,4 @@ -// 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. @@ -6,6 +6,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/chrome_paths.h" @@ -61,7 +62,7 @@ class SunSpiderTest : public UIPerfTest { bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) { return WaitUntilCookieValue(tab, test_url, "__done", - UITest::test_timeout_ms(), "1"); + TestTimeouts::huge_test_timeout_ms(), "1"); } bool GetTotal(TabProxy* tab, std::string* total) { diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index fbf06ac..f5c4086 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -1,4 +1,4 @@ -// 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. @@ -252,9 +252,6 @@ class UITestBase { static int action_max_timeout_ms() { return TestTimeouts::action_max_timeout_ms(); } - static int test_timeout_ms() { - return TestTimeouts::huge_test_timeout_ms(); - } // Fetch the state which determines whether the profile will be cleared on // next startup. diff --git a/chrome/test/ui/v8_benchmark_uitest.cc b/chrome/test/ui/v8_benchmark_uitest.cc index b531cbc..b3d12c9 100644 --- a/chrome/test/ui/v8_benchmark_uitest.cc +++ b/chrome/test/ui/v8_benchmark_uitest.cc @@ -1,4 +1,4 @@ -// 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. @@ -7,6 +7,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/chrome_paths.h" @@ -62,7 +63,7 @@ class V8BenchmarkTest : public UIPerfTest { bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) { return WaitUntilCookieValue(tab, test_url, "__done", - UITest::test_timeout_ms(), "1"); + TestTimeouts::huge_test_timeout_ms(), "1"); } bool GetScore(TabProxy* tab, std::string* score) { diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc index 98ea508..d1efc5b 100644 --- a/chrome/test/url_fetch_test/url_fetch_test.cc +++ b/chrome/test/url_fetch_test/url_fetch_test.cc @@ -1,4 +1,4 @@ -// 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. @@ -7,6 +7,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/test/test_timeouts.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/tab_proxy.h" @@ -53,13 +54,15 @@ class UrlFetchTest : public UITest { if (wait_cookie_name) { if (wait_cookie_value) { - bool completed = WaitUntilCookieValue(tab.get(), url, wait_cookie_name, - UITest::test_timeout_ms(), - wait_cookie_value); + bool completed = WaitUntilCookieValue( + tab.get(), url, wait_cookie_name, + TestTimeouts::huge_test_timeout_ms(), + wait_cookie_value); ASSERT_TRUE(completed); } else { result->cookie_value = WaitUntilCookieNonEmpty( - tab.get(), url, wait_cookie_name, UITest::test_timeout_ms()); + tab.get(), url, wait_cookie_name, + TestTimeouts::huge_test_timeout_ms()); ASSERT_TRUE(result->cookie_value.length()); } } |