From ec90c56d8ad891bcb8643ace29842506b0cfb12d Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Wed, 14 Oct 2009 17:51:38 -0700 Subject: [PATCH] Increase test tolerance to reflect observed errors in bug 435441 comments 103 and 105, and handle timer firing after 8 seconds (comment 104). --- layout/style/test/test_transitions.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/layout/style/test/test_transitions.html b/layout/style/test/test_transitions.html index ac222a72a5c..ad90be789d2 100644 --- a/layout/style/test/test_transitions.html +++ b/layout/style/test/test_transitions.html @@ -402,7 +402,7 @@ function check_transition_value(func, start_time, end_time, time_portion = 1; // Assume a small error since bezier computation can be off slightly. // (This test's computation is probably more accurate than Mozilla's.) - var value_portion = func(time_portion) + error_direction * 0.0005; + var value_portion = func(time_portion) + error_direction * 0.0007; if (value_portion < 0) value_portion = 0; else if (value_portion > 1) @@ -452,8 +452,14 @@ function check_ref_range() // This is the only test where we compare the progress of the // transitions to an actual time; we need considerable tolerance at // the low end (we are using half a second). - var expected_range = [ (gCurrentTime - gStartTime2 - 500) / 8, + var expected_range = [ (gCurrentTime - gStartTime2 - 750) / 8, (Date.now() - gStartTime1 + 20) / 8 ]; + if (expected_range[0] > 1000) { + expected_range[0] = 1000; + } + if (expected_range[1] > 1000) { + expected_range[1] = 1000; + } function check(desc, value) { ok(expected_range[0] <= value && value <= expected_range[1], desc + ": computed value " + value + "px should be between " +