Bug 1324554 - Part 3: More tests for test_animation_properties.html. r=hiro, a=ritu
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 06 Mar 2017 21:40:00 -0500
changeset 378975 6e9bbdb98c091ebfe94f6c3866e211bce60105c9
parent 378974 b77d8b1003d540cf1f9d0819a83b209901275b0e
child 378976 f83bd2c01258711ad6cfcf14ad73c85b1a586f85
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro, ritu
bugs1324554
milestone53.0
Bug 1324554 - Part 3: More tests for test_animation_properties.html. r=hiro, a=ritu MozReview-Commit-ID: 6MkkP8yNGvg
dom/animation/test/chrome/test_animation_properties.html
--- a/dom/animation/test/chrome/test_animation_properties.html
+++ b/dom/animation/test/chrome/test_animation_properties.html
@@ -704,32 +704,86 @@ var gTests = [
                             value(1, '5px', 'replace') ] },
                 { property: 'margin-bottom',
                   values: [ value(0, undefined, 'add', 'linear'),
                             value(1, '5px', 'replace') ] },
                 { property: 'margin-left',
                   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' },
                 { } ],
     expected: [ { property: 'margin-top',
                   values: [ value(0, '5px', 'replace', 'linear'),
                             value(1, undefined, 'add') ] },
                 { property: 'margin-right',
                   values: [ value(0, '5px', 'replace', 'linear'),
                             value(1, undefined, 'add') ] },
                 { property: 'margin-bottom',
                   values: [ value(0, '5px', 'replace', 'linear'),
                             value(1, undefined, 'add') ] },
                 { property: 'margin-left',
                   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' },
                 { marginLeft: '5px',
                   marginRight: '5px',
                   marginBottom: '5px' } ],
     expected: [ { property: 'margin-bottom',
                   values: [ value(0, '5px', 'replace', 'linear'),