| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Test removal of animation shorthand property</title> | 3 <title>Test removal of animation shorthand property</title> |
| 4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
| 5 .box { | 5 .box { |
| 6 height: 10px; | 6 height: 10px; |
| 7 width: 10px; | 7 width: 10px; |
| 8 background-color: blue; | 8 background-color: blue; |
| 9 } | 9 } |
| 10 | 10 |
| 11 @-webkit-keyframes anim1 { } | 11 @keyframes anim1 { } |
| 12 </style> | 12 </style> |
| 13 <script type="text/javascript" charset="utf-8"> | 13 <script type="text/javascript" charset="utf-8"> |
| 14 if (window.testRunner) { | 14 if (window.testRunner) { |
| 15 testRunner.dumpAsText(); | 15 testRunner.dumpAsText(); |
| 16 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 const kProperties = [ | 19 const kProperties = [ |
| 20 "webkitAnimationName", | 20 "animationName", |
| 21 "webkitAnimationDuration", | 21 "animationDuration", |
| 22 "webkitAnimationTimingFunction", | 22 "animationTimingFunction", |
| 23 "webkitAnimationDelay", | 23 "animationDelay", |
| 24 "webkitAnimationIterationCount", | 24 "animationIterationCount", |
| 25 "webkitAnimationDirection", | 25 "animationDirection", |
| 26 "webkitAnimationFillMode" | 26 "animationFillMode" |
| 27 ]; | 27 ]; |
| 28 const kElements = [ | 28 const kElements = [ |
| 29 { id: "a", | 29 { id: "a", |
| 30 values: [ ] | 30 values: [ ] |
| 31 }, | 31 }, |
| 32 { id: "b", | 32 { id: "b", |
| 33 values: [ "none", "0s", "ease", "0s", "1", "normal", "none" ] | 33 values: [ "none", "0s", "ease", "0s", "1", "normal", "none" ] |
| 34 }, | 34 }, |
| 35 { id: "c", | 35 { id: "c", |
| 36 values: [ "anim1", "10s" ] | 36 values: [ "anim1", "10s" ] |
| (...skipping 22 matching lines...) Expand all Loading... |
| 59 for (var i=0; i < curEl.values.length; i++) { | 59 for (var i=0; i < curEl.values.length; i++) { |
| 60 el.style[kProperties[i]] = curEl.values[i]; | 60 el.style[kProperties[i]] = curEl.values[i]; |
| 61 } | 61 } |
| 62 }); | 62 }); |
| 63 setTimeout(remove, 0); | 63 setTimeout(remove, 0); |
| 64 } | 64 } |
| 65 | 65 |
| 66 function remove() { | 66 function remove() { |
| 67 kElements.forEach(function(curEl) { | 67 kElements.forEach(function(curEl) { |
| 68 var el = document.getElementById(curEl.id); | 68 var el = document.getElementById(curEl.id); |
| 69 el.style.removeProperty("-webkit-animation"); | 69 el.style.removeProperty("animation"); |
| 70 }); | 70 }); |
| 71 setTimeout(test, 0); | 71 setTimeout(test, 0); |
| 72 } | 72 } |
| 73 | 73 |
| 74 function test() { | 74 function test() { |
| 75 var resultsString = ""; | 75 var resultsString = ""; |
| 76 kElements.forEach(function(curEl) { | 76 kElements.forEach(function(curEl) { |
| 77 var el = document.getElementById(curEl.id); | 77 var el = document.getElementById(curEl.id); |
| 78 var elStyle = window.getComputedStyle(el); | 78 var elStyle = window.getComputedStyle(el); |
| 79 | 79 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 103 <div id="c" class="box"></div> | 103 <div id="c" class="box"></div> |
| 104 <div id="d" class="box"></div> | 104 <div id="d" class="box"></div> |
| 105 <div id="e" class="box"></div> | 105 <div id="e" class="box"></div> |
| 106 <div id="f" class="box"></div> | 106 <div id="f" class="box"></div> |
| 107 <div id="g" class="box"></div> | 107 <div id="g" class="box"></div> |
| 108 <div id="h" class="box"></div> | 108 <div id="h" class="box"></div> |
| 109 <div id="result"> | 109 <div id="result"> |
| 110 </div> | 110 </div> |
| 111 </body> | 111 </body> |
| 112 </html> | 112 </html> |
| OLD | NEW |