Skip to content

Commit

Permalink
Merge pull request web-platform-tests#11 from alancutter/timingDefaults
Browse files Browse the repository at this point in the history
Upstream animation-effect-timing-defaults.html from Blink
  • Loading branch information
suzyh authored Jul 18, 2016
2 parents e942c1b + 6bb8044 commit e0ff23d
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web-animations/interfaces/AnimationEffectTiming/delay.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.delay, 0);
}, 'Test default value');

test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] }, 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.direction, 'normal');
}, 'Test default value');

test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
Expand Down
5 changes: 5 additions & 0 deletions web-animations/interfaces/AnimationEffectTiming/duration.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.duration, 'auto');
}, 'Test default value');

test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
Expand Down
5 changes: 5 additions & 0 deletions web-animations/interfaces/AnimationEffectTiming/easing.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.easing, 'linear');
}, 'Test default value');

function assert_progress(animation, currentTime, easingFunction) {
animation.currentTime = currentTime;
var portion = currentTime / animation.effect.timing.duration;
Expand Down
5 changes: 5 additions & 0 deletions web-animations/interfaces/AnimationEffectTiming/endDelay.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.endDelay, 0);
}, 'Test default value');

test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
Expand Down
5 changes: 5 additions & 0 deletions web-animations/interfaces/AnimationEffectTiming/fill.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.fill, 'auto');
}, 'Test default value');

["none", "forwards", "backwards", "both", ].forEach(function(fill){
test(function(t) {
var div = createDiv(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.iterationStart, 0);
}, 'Test default value');

test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<script>
'use strict';

test(function(t) {
var anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.iterations, 1);
}, 'Test default value');

test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
Expand Down

0 comments on commit e0ff23d

Please sign in to comment.