Bug 1324554 - Part 3: More tests for test_animation_properties.html. r=hiro

MozReview-Commit-ID: 6MkkP8yNGvg

--HG--
extra : rebase_source : 091a1d72747b445a80c255bcc09e33fe23760446
This commit is contained in:
Boris Chiou 2017-02-02 11:05:35 +08:00
Родитель 3a9474ac19
Коммит 015e8b8198
1 изменённых файлов: 54 добавлений и 0 удалений

Просмотреть файл

@ -709,6 +709,33 @@ var gTests = [
values: [ value(0, undefined, 'add', 'linear'),
value(1, '5px', 'replace') ] } ]
},
{ desc: 'a missing property in initial keyframe and there are some ' +
'keyframes with the same offset',
frames: [ { },
{ margin: '10px', offset: 0.5 },
{ margin: '20px', offset: 0.5 },
{ margin: '30px'} ],
expected: [ { property: 'margin-top',
values: [ value(0, undefined, 'add', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, '30px', 'replace') ] },
{ property: 'margin-right',
values: [ value(0, undefined, 'add', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, '30px', 'replace') ] },
{ property: 'margin-bottom',
values: [ value(0, undefined, 'add', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, '30px', 'replace') ] },
{ property: 'margin-left',
values: [ value(0, undefined, 'add', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, '30px', 'replace') ] } ]
},
{ desc: 'a missing property in final keyframe',
frames: [ { margin: '5px' },
{ } ],
@ -725,6 +752,33 @@ var gTests = [
values: [ value(0, '5px', 'replace', 'linear'),
value(1, undefined, 'add') ] } ]
},
{ desc: 'a missing property in final keyframe and there are some ' +
'keyframes with the same offsets',
frames: [ { margin: '5px' },
{ margin: '10px', offset: 0.5 },
{ margin: '20px', offset: 0.5 },
{ } ],
expected: [ { property: 'margin-top',
values: [ value(0, '5px', 'replace', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, undefined, 'add') ] },
{ property: 'margin-right',
values: [ value(0, '5px', 'replace', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, undefined, 'add') ] },
{ property: 'margin-bottom',
values: [ value(0, '5px', 'replace', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, undefined, 'add') ] },
{ property: 'margin-left',
values: [ value(0, '5px', 'replace', 'linear'),
value(0.5, '10px', 'replace'),
value(0.5, '20px', 'replace', 'linear'),
value(1, undefined, 'add') ] } ]
},
{ desc: 'a missing property in final keyframe where it forms the last'
+ ' segment in the series',
frames: [ { margin: '5px' },