summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui/mouseleave_uitest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 08:08:05 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 08:08:05 +0000
commit8477e568f80707c5d504b602fe10afdab1ab20c8 (patch)
tree765e79905867d0c3098b3e5a3b8faa76caf08ebe /chrome/test/ui/mouseleave_uitest.cc
parentfe7f21bf4373de03fdfe678b28d45ce61b70533d (diff)
downloadchromium_src-8477e568f80707c5d504b602fe10afdab1ab20c8.zip
chromium_src-8477e568f80707c5d504b602fe10afdab1ab20c8.tar.gz
chromium_src-8477e568f80707c5d504b602fe10afdab1ab20c8.tar.bz2
[GTTF] Unify polling interval in some of the polling functions
in the UI test framework: - WaitUntilCookieValue - WaitUntilCookieNonEmpty - WaitUntilJavaScriptCondition This helps reduce number of arbitrary "magic timeouts" which are different in each test. We don't remove the test timeout parameter, because it varies depending on test case, and for now we don't have a better solution. Trying a "naive" way leads to hangs on flaky tests. TEST=UI-based tests BUG=none Review URL: http://codereview.chromium.org/1557001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/mouseleave_uitest.cc')
-rw-r--r--chrome/test/ui/mouseleave_uitest.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/test/ui/mouseleave_uitest.cc b/chrome/test/ui/mouseleave_uitest.cc
index 311b27a..91a269f 100644
--- a/chrome/test/ui/mouseleave_uitest.cc
+++ b/chrome/test/ui/mouseleave_uitest.cc
@@ -69,12 +69,11 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url));
const int timeout_ms = 5 * action_max_timeout_ms();
- const int check_interval_ms = action_max_timeout_ms() / 10;
// 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", check_interval_ms, timeout_ms,
+ tab.get(), test_url, "__state", timeout_ms,
"initial"));
// Move the cursor to the top-center of the content, which will trigger
@@ -83,7 +82,7 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
// Wait on the correct intermediate value of the cookie.
ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state", check_interval_ms, timeout_ms,
+ tab.get(), test_url, "__state", timeout_ms,
"initial,entered"));
// Move the cursor above the content again, which should trigger
@@ -92,7 +91,7 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
// Wait on the correct final value of the cookie.
ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state", check_interval_ms, timeout_ms,
+ tab.get(), test_url, "__state", timeout_ms,
"initial,entered,left"));
}