зеркало из https://github.com/mozilla/pjs.git
Increase test tolerance to reflect observed errors in bug 435441 comments 103 and 105, and handle timer firing after 8 seconds (comment 104).
This commit is contained in:
Родитель
bc7f976c2b
Коммит
ec90c56d8a
|
@ -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 " +
|
||||
|
|
Загрузка…
Ссылка в новой задаче