summaryrefslogtreecommitdiffstats
path: root/chrome/test/perf
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 21:38:37 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 21:38:37 +0000
commit7e712a839266bd3d046e8420c67c739968940c6c (patch)
tree06e60cb855cc4acddb199cfc322e42769b679976 /chrome/test/perf
parenta39ca1650e8ee83553a2c91c6712a71647fa2ff1 (diff)
downloadchromium_src-7e712a839266bd3d046e8420c67c739968940c6c.zip
chromium_src-7e712a839266bd3d046e8420c67c739968940c6c.tar.gz
chromium_src-7e712a839266bd3d046e8420c67c739968940c6c.tar.bz2
Revert 146656 - Switch to TimeDelta interfaces in chrome automation test infrastructure.
BUG=108171 Review URL: https://chromiumcodereview.appspot.com/10736064 TBR=tedvessenes@gmail.com Review URL: https://chromiumcodereview.appspot.com/10781003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/perf')
-rw-r--r--chrome/test/perf/dom_checker_uitest.cc2
-rw-r--r--chrome/test/perf/dromaeo_benchmark_uitest.cc2
-rw-r--r--chrome/test/perf/frame_rate/frame_rate_tests.cc4
-rw-r--r--chrome/test/perf/indexeddb_uitest.cc2
-rw-r--r--chrome/test/perf/kraken_benchmark_uitest.cc2
-rw-r--r--chrome/test/perf/page_cycler_test.cc4
-rw-r--r--chrome/test/perf/startup_test.cc2
-rw-r--r--chrome/test/perf/sunspider_uitest.cc2
-rw-r--r--chrome/test/perf/tab_switching_test.cc3
-rw-r--r--chrome/test/perf/url_fetch_test.cc12
-rw-r--r--chrome/test/perf/v8_benchmark_uitest.cc2
11 files changed, 18 insertions, 19 deletions
diff --git a/chrome/test/perf/dom_checker_uitest.cc b/chrome/test/perf/dom_checker_uitest.cc
index b145b51..20725c9 100644
--- a/chrome/test/perf/dom_checker_uitest.cc
+++ b/chrome/test/perf/dom_checker_uitest.cc
@@ -145,7 +145,7 @@ class DomCheckerTest : public UITest {
bool WaitUntilTestCompletes(TabProxy* tab) {
return WaitUntilJavaScriptCondition(tab, L"",
L"window.domAutomationController.send(automation.IsDone());",
- TestTimeouts::large_test_timeout());
+ TestTimeouts::large_test_timeout_ms());
}
bool GetTestCount(TabProxy* tab, int* test_count) {
diff --git a/chrome/test/perf/dromaeo_benchmark_uitest.cc b/chrome/test/perf/dromaeo_benchmark_uitest.cc
index 74b6222..945344a 100644
--- a/chrome/test/perf/dromaeo_benchmark_uitest.cc
+++ b/chrome/test/perf/dromaeo_benchmark_uitest.cc
@@ -60,7 +60,7 @@ class DromaeoTest : public UIPerfTest {
bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
return WaitUntilCookieValue(tab, test_url, "__done",
- TestTimeouts::large_test_timeout(), "1");
+ TestTimeouts::large_test_timeout_ms(), "1");
}
bool GetScore(TabProxy* tab, std::string* score) {
diff --git a/chrome/test/perf/frame_rate/frame_rate_tests.cc b/chrome/test/perf/frame_rate/frame_rate_tests.cc
index 865bc92..8392a2d 100644
--- a/chrome/test/perf/frame_rate/frame_rate_tests.cc
+++ b/chrome/test/perf/frame_rate/frame_rate_tests.cc
@@ -191,7 +191,7 @@ class FrameRateTest
// that flag kHasRedirect is enabled for the current test.
ASSERT_TRUE(WaitUntilJavaScriptCondition(
tab, L"", L"window.domAutomationController.send(__initialized);",
- TestTimeouts::large_test_timeout()));
+ TestTimeouts::large_test_timeout_ms()));
if (HasFlag(kForceGpuComposited)) {
ASSERT_TRUE(tab->NavigateToURLAsync(
@@ -204,7 +204,7 @@ class FrameRateTest
// Block until the tests completes.
ASSERT_TRUE(WaitUntilJavaScriptCondition(
tab, L"", L"window.domAutomationController.send(!__running_all);",
- TestTimeouts::large_test_timeout()));
+ TestTimeouts::large_test_timeout_ms()));
// TODO(jbates): remove this check when ref builds are updated.
if (!HasFlag(kUseReferenceBuild)) {
diff --git a/chrome/test/perf/indexeddb_uitest.cc b/chrome/test/perf/indexeddb_uitest.cc
index 0014d17..dee0618 100644
--- a/chrome/test/perf/indexeddb_uitest.cc
+++ b/chrome/test/perf/indexeddb_uitest.cc
@@ -58,7 +58,7 @@ class IndexedDBTest : public UIPerfTest {
bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
return WaitUntilCookieValue(tab, test_url, "__done",
- TestTimeouts::large_test_timeout(), "1");
+ TestTimeouts::large_test_timeout_ms(), "1");
}
bool GetResults(TabProxy* tab, ResultsMap* results) {
diff --git a/chrome/test/perf/kraken_benchmark_uitest.cc b/chrome/test/perf/kraken_benchmark_uitest.cc
index bc87c97..cc8c915 100644
--- a/chrome/test/perf/kraken_benchmark_uitest.cc
+++ b/chrome/test/perf/kraken_benchmark_uitest.cc
@@ -56,7 +56,7 @@ class KrakenBenchmarkTest : public UIPerfTest {
private:
bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
return WaitUntilCookieValue(tab, test_url, "__done",
- TestTimeouts::large_test_timeout(), "1");
+ TestTimeouts::large_test_timeout_ms(), "1");
}
bool GetResults(TabProxy* tab, ResultsMap* results) {
diff --git a/chrome/test/perf/page_cycler_test.cc b/chrome/test/perf/page_cycler_test.cc
index 65b3621..b662660 100644
--- a/chrome/test/perf/page_cycler_test.cc
+++ b/chrome/test/perf/page_cycler_test.cc
@@ -201,7 +201,7 @@ class PageCyclerTest : public UIPerfTest {
// Wait for the test to finish.
ASSERT_TRUE(WaitUntilCookieValue(
tab.get(), test_url, "__pc_done",
- TestTimeouts::large_test_timeout(), "1"));
+ TestTimeouts::large_test_timeout_ms(), "1"));
std::string cookie;
ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie));
@@ -211,7 +211,7 @@ class PageCyclerTest : public UIPerfTest {
// Wait for the report.html to be loaded.
ASSERT_TRUE(WaitUntilCookieValue(
tab.get(), test_url, "__navigated_to_report",
- TestTimeouts::action_max_timeout(), "1"));
+ TestTimeouts::action_max_timeout_ms(), "1"));
// Get the timing cookie value from the DOM automation.
std::wstring wcookie;
diff --git a/chrome/test/perf/startup_test.cc b/chrome/test/perf/startup_test.cc
index 09682f6..e57715a 100644
--- a/chrome/test/perf/startup_test.cc
+++ b/chrome/test/perf/startup_test.cc
@@ -213,7 +213,7 @@ class StartupTest : public UIPerfTest {
ASSERT_TRUE(browser_proxy.get());
if (browser_proxy->GetInitialLoadTimes(
- TestTimeouts::action_max_timeout(),
+ TestTimeouts::action_max_timeout_ms(),
&min_start,
&max_stop,
&times) &&
diff --git a/chrome/test/perf/sunspider_uitest.cc b/chrome/test/perf/sunspider_uitest.cc
index 84b9268..8a0961e 100644
--- a/chrome/test/perf/sunspider_uitest.cc
+++ b/chrome/test/perf/sunspider_uitest.cc
@@ -62,7 +62,7 @@ class SunSpiderTest : public UIPerfTest {
bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
return WaitUntilCookieValue(tab, test_url, "__done",
- TestTimeouts::large_test_timeout(), "1");
+ TestTimeouts::large_test_timeout_ms(), "1");
}
bool GetTotal(TabProxy* tab, std::string* total) {
diff --git a/chrome/test/perf/tab_switching_test.cc b/chrome/test/perf/tab_switching_test.cc
index 76e2eca..4ae8cb6 100644
--- a/chrome/test/perf/tab_switching_test.cc
+++ b/chrome/test/perf/tab_switching_test.cc
@@ -97,8 +97,7 @@ class TabSwitchingUITest : public UIPerfTest {
ASSERT_TRUE(browser_proxy_->GetTabCount(&final_tab_count));
for (int j = initial_tab_count; j < final_tab_count; ++j) {
ASSERT_TRUE(browser_proxy_->ActivateTab(j));
- ASSERT_TRUE(browser_proxy_->WaitForTabToBecomeActive(
- j, base::TimeDelta::FromSeconds(10)));
+ ASSERT_TRUE(browser_proxy_->WaitForTabToBecomeActive(j, 10000));
}
// Close the browser to force a dump of log.
diff --git a/chrome/test/perf/url_fetch_test.cc b/chrome/test/perf/url_fetch_test.cc
index 8374b18..faa2c4f 100644
--- a/chrome/test/perf/url_fetch_test.cc
+++ b/chrome/test/perf/url_fetch_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 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.
@@ -45,7 +45,7 @@ class UrlFetchTest : public UIPerfTest {
const char* var_to_fetch,
const std::string& wait_js_expr,
const std::string& wait_js_frame_xpath,
- base::TimeDelta wait_js_timeout,
+ int wait_js_timeout_ms,
UrlFetchTestResult* result) {
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(url));
@@ -54,13 +54,13 @@ class UrlFetchTest : public UIPerfTest {
if (wait_cookie_value) {
bool completed = WaitUntilCookieValue(
tab.get(), url, wait_cookie_name,
- TestTimeouts::large_test_timeout(),
+ TestTimeouts::large_test_timeout_ms(),
wait_cookie_value);
ASSERT_TRUE(completed);
} else {
result->cookie_value = WaitUntilCookieNonEmpty(
tab.get(), url, wait_cookie_name,
- TestTimeouts::large_test_timeout());
+ TestTimeouts::large_test_timeout_ms());
ASSERT_TRUE(result->cookie_value.length());
}
} else if (!wait_js_expr.empty()) {
@@ -68,7 +68,7 @@ class UrlFetchTest : public UIPerfTest {
tab.get(),
UTF8ToWide(wait_js_frame_xpath),
UTF8ToWide(wait_js_expr),
- wait_js_timeout);
+ wait_js_timeout_ms);
ASSERT_TRUE(completed);
}
if (var_to_fetch) {
@@ -161,7 +161,7 @@ TEST_F(UrlFetchTest, UrlFetch) {
jsvar.length() > 0 ? jsvar.c_str() : NULL,
js_expr,
js_frame_xpath,
- base::TimeDelta::FromMilliseconds(js_timeout_ms),
+ js_timeout_ms,
&result);
// Write out the cookie if requested
diff --git a/chrome/test/perf/v8_benchmark_uitest.cc b/chrome/test/perf/v8_benchmark_uitest.cc
index 8f3af9f..031c624 100644
--- a/chrome/test/perf/v8_benchmark_uitest.cc
+++ b/chrome/test/perf/v8_benchmark_uitest.cc
@@ -63,7 +63,7 @@ class V8BenchmarkTest : public UIPerfTest {
bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
return WaitUntilCookieValue(tab, test_url, "__done",
- TestTimeouts::large_test_timeout(), "1");
+ TestTimeouts::large_test_timeout_ms(), "1");
}
bool GetScore(TabProxy* tab, std::string* score) {