summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-23 19:15:30 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-23 19:15:30 +0000
commit408f2188cdce0e0d82571be4d9dfa7227751fb1b (patch)
treec328e6576d3c26dacf1a35fd7d77cfb0edcdaf7c /webkit
parente3edeba811a05e3a87606b672182e8c106dbc3e9 (diff)
downloadchromium_src-408f2188cdce0e0d82571be4d9dfa7227751fb1b.zip
chromium_src-408f2188cdce0e0d82571be4d9dfa7227751fb1b.tar.gz
chromium_src-408f2188cdce0e0d82571be4d9dfa7227751fb1b.tar.bz2
Fix interval layout test.
Here are recent failures from the buildbot: FAIL - start, debug_output: [ms: 499611] FAIL - start, debug_output: [ms: 499723] Fixed by adding a ms of fuzz time to account for timer inaccuracies. Also sped up the test by changing the pause(500) to pause(50) which should still be more than enough. Review URL: http://codereview.chromium.org/42405 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/data/layout_tests/chrome/fast/dom/extensions/interval.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/data/layout_tests/chrome/fast/dom/extensions/interval.html b/webkit/data/layout_tests/chrome/fast/dom/extensions/interval.html
index f4bd7b9..b05036d 100644
--- a/webkit/data/layout_tests/chrome/fast/dom/extensions/interval.html
+++ b/webkit/data/layout_tests/chrome/fast/dom/extensions/interval.html
@@ -36,15 +36,17 @@ function test() {
// Verify that starting the timer works.
interval.start();
- pause(500);
+ pause(50);
ms = interval.microseconds();
- check("start", ms >= 500000, "[ms: " + ms + "]");
+ // Due to clock skew and granularity, we see sporadic failures if we check for
+ // ms >= 50000, so add a bit of buffer.
+ check("start", ms >= 49000, "[ms: " + ms + "]");
// Verify that restarting the interval should reset the beginning time
interval.start();
pause(1);
ms = interval.microseconds();
- check("restart", ms > 0 && ms < 500000, "[ms: " + ms + "]");
+ check("restart", ms > 0 && ms < 50000, "[ms: " + ms + "]");
// Verify that calling stop() before start() has no effect.
var interval = new chromium.Interval();
@@ -57,14 +59,14 @@ function test() {
pause(50);
interval.stop();
ms = interval.microseconds();
- check("stop", ms > 0 && ms < 1000000, "[ms: " + ms + "]");
+ check("stop", ms > 0 && ms < 100000, "[ms: " + ms + "]");
// Verify that the timer is really stopped.
var ms2 = interval.microseconds();
check("stopped", ms == ms2, "[ms: " + ms + "]" + "[ms2: " + ms2 + "]");
// Verify that re-stopping the timer works.
- pause(500);
+ pause(50);
interval.stop();
ms2 = interval.microseconds();
check("re-stopped", ms2 > ms, "[ms: " + ms + "]" + "[ms2: " + ms2 + "]");