3 <title>Test removal of animation shorthand property
</title>
4 <style type=
"text/css" media=
"screen">
8 background-color: blue;
11 @-webkit-keyframes anim1 { }
13 <script type=
"text/javascript" charset=
"utf-8">
14 if (window.testRunner) {
15 testRunner.dumpAsText();
16 testRunner.waitUntilDone();
20 "webkitAnimationName",
21 "webkitAnimationDuration",
22 "webkitAnimationTimingFunction",
23 "webkitAnimationDelay",
24 "webkitAnimationIterationCount",
25 "webkitAnimationDirection",
26 "webkitAnimationFillMode"
33 values: [
"none",
"0s",
"ease",
"0s",
"1",
"normal",
"none" ]
36 values: [
"anim1",
"10s" ]
39 values: [
"anim1",
"10s",
"linear" ]
42 values: [
"anim1",
"10s",
"linear",
"5s" ]
45 values: [
"anim1",
"10s",
"linear",
"5s",
"3" ]
48 values: [
"anim1",
"10s",
"linear",
"5s",
"infinite",
"alternate" ]
51 values: [
"anim1",
"10s",
"linear",
"5s",
"infinite",
"alternate",
"forwards" ]
54 const kExpectedResults = [
"none",
"0s",
"ease",
"0s",
"1",
"normal",
"none" ];
57 kElements.forEach(function(curEl) {
58 var el = document.getElementById(curEl.id);
59 for (var i=
0; i < curEl.values.length; i++) {
60 el.style[kProperties[i]] = curEl.values[i];
63 setTimeout(remove,
0);
67 kElements.forEach(function(curEl) {
68 var el = document.getElementById(curEl.id);
69 el.style.removeProperty(
"-webkit-animation");
75 var resultsString =
"";
76 kElements.forEach(function(curEl) {
77 var el = document.getElementById(curEl.id);
78 var elStyle = window.getComputedStyle(el);
80 for (var i=
0; i < kProperties.length; i++) {
81 var computedValue = elStyle[kProperties[i]];
82 var expectedValue = kExpectedResults[i];
83 if (computedValue == expectedValue)
84 resultsString +=
"Testing " + kProperties[i] +
" on " + curEl.id +
": PASS" +
"<br>";
86 resultsString +=
"Testing " + kProperties[i] +
" on " + curEl.id +
" expected <code>" + expectedValue +
"</code> got <code>" + computedValue +
"</code>: FAIL" +
"<br>";
91 var results = document.getElementById('result');
92 results.innerHTML = resultsString;
93 if (window.testRunner)
94 testRunner.notifyDone();
97 window.addEventListener('load', start, false);
101 <div id=
"a" class=
"box"></div>
102 <div id=
"b" class=
"box"></div>
103 <div id=
"c" class=
"box"></div>
104 <div id=
"d" class=
"box"></div>
105 <div id=
"e" class=
"box"></div>
106 <div id=
"f" class=
"box"></div>
107 <div id=
"g" class=
"box"></div>
108 <div id=
"h" class=
"box"></div>