mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1256503 - Part 2: Increase some test animation durations to be at least 100 seconds. r=dholbert
In some of these cases, this increase isn't strictly necessary, because we only check state immediately after creating the animation, before it could have completed (regardless of its duration). Still: we should consistently use long durations for any animations that aren't expected to complete during the test run, because short durations might accidentally get copypasted into new tests where they might cause intermittent failures. MozReview-Commit-ID: 8wSRqHMI12L --HG-- extra : rebase_source : 12e6a054dce047351b06e064bcedd9cdec58150f
This commit is contained in:
parent
75228bfa24
commit
d15dbe558c
@ -19,7 +19,7 @@ var win = document.getElementById('iframe').contentWindow;
|
||||
async_test(function(t) {
|
||||
window.addEventListener('load', t.step_func(function() {
|
||||
var target = win.document.getElementById('target');
|
||||
var anim = target.animate({ opacity: [ 0, 1 ] }, 2 * MS_PER_SEC);
|
||||
var anim = target.animate({ opacity: [ 0, 1 ] }, 100 * MS_PER_SEC);
|
||||
// In the x-ray case, the frames object will be given an opaque wrapper
|
||||
// so it won't be possible to fetch any frames from it.
|
||||
assert_equals(anim.effect.getFrames().length, 0);
|
||||
|
@ -1525,27 +1525,27 @@ addAsyncAnimTest("tree_ordering", { observe: div, subtree: true }, function*() {
|
||||
[ div, pseudoTarget ].forEach(function(target) {
|
||||
addAsyncAnimTest("change_duration_and_currenttime",
|
||||
{ observe: div, subtree: true }, function*() {
|
||||
var anim = target.animate({ opacity: [ 0, 1 ] }, 100 * MS_PER_SEC);
|
||||
var anim = target.animate({ opacity: [ 0, 1 ] }, 200 * MS_PER_SEC);
|
||||
|
||||
yield await_frame();
|
||||
assert_records([{ added: [anim], changed: [], removed: [] }],
|
||||
"records after animation is added");
|
||||
|
||||
anim.effect.timing.duration = 10 * MS_PER_SEC;
|
||||
anim.effect.timing.duration = 100 * MS_PER_SEC;
|
||||
yield await_frame();
|
||||
assert_records([{ added: [], changed: [anim], removed: [] }],
|
||||
"records after duration is changed");
|
||||
|
||||
anim.effect.timing.duration = 10 * MS_PER_SEC;
|
||||
anim.effect.timing.duration = 100 * MS_PER_SEC;
|
||||
yield await_frame();
|
||||
assert_records([], "records after assigning same value");
|
||||
|
||||
anim.currentTime = 50 * MS_PER_SEC;
|
||||
anim.currentTime = 500 * MS_PER_SEC;
|
||||
yield await_frame();
|
||||
assert_records([{ added: [], changed: [], removed: [anim] }],
|
||||
"records after animation end");
|
||||
|
||||
anim.effect.timing.duration = 100 * MS_PER_SEC;
|
||||
anim.effect.timing.duration = 1000 * MS_PER_SEC;
|
||||
yield await_frame();
|
||||
assert_records([{ added: [anim], changed: [], removed: [] }],
|
||||
"records after animation restarted");
|
||||
@ -1597,7 +1597,8 @@ addAsyncAnimTest("change_enddelay_and_currenttime",
|
||||
addAsyncAnimTest("change_enddelay_and_currenttime",
|
||||
{ observe: div, subtree: true }, function*() {
|
||||
var anim = div.animate({ opacity: [ 0, 1 ] },
|
||||
{ duration: 100, endDelay: -100 });
|
||||
{ duration: 100 * MS_PER_SEC,
|
||||
endDelay: -100 * MS_PER_SEC });
|
||||
yield await_frame();
|
||||
assert_records([], "records after animation is added");
|
||||
});
|
||||
|
@ -493,7 +493,7 @@ var gTests = [
|
||||
gTests.forEach(function(subtest) {
|
||||
test(function(t) {
|
||||
var div = addDiv(t);
|
||||
var animation = div.animate(subtest.frames, 1 * MS_PER_SEC);
|
||||
var animation = div.animate(subtest.frames, 100 * MS_PER_SEC);
|
||||
assert_properties_equal(animation.effect.getProperties(),
|
||||
subtest.expected);
|
||||
}, subtest.desc);
|
||||
|
@ -287,14 +287,14 @@ promise_test(function(t) {
|
||||
|
||||
promise_test(function(t) {
|
||||
var div = addDiv(t);
|
||||
var animation = div.animate({ opacity: [ 0, 1 ] }, 100 * MS_PER_SEC);
|
||||
var animation = div.animate({ opacity: [ 0, 1 ] }, 200 * MS_PER_SEC);
|
||||
|
||||
return animation.ready.then(t.step_func(function() {
|
||||
assert_equals(animation.isRunningOnCompositor, omtaEnabled,
|
||||
'Animation reports that it is running on the compositor');
|
||||
|
||||
animation.currentTime = 50 * MS_PER_SEC;
|
||||
animation.effect.timing.duration = 10 * MS_PER_SEC;
|
||||
animation.currentTime = 150 * MS_PER_SEC;
|
||||
animation.effect.timing.duration = 100 * MS_PER_SEC;
|
||||
|
||||
assert_equals(animation.isRunningOnCompositor, false,
|
||||
'Animation reports that it is NOT running on the compositor'
|
||||
|
Loading…
Reference in New Issue
Block a user