2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
6 <div id='element'
></div>
10 var element
= document
.getElementById('element');
11 var container
= document
.getElementById('container');
14 element
.style
.fontSize
= '10px';
15 var player
= element
.animate([{bottom
: '3em'}, {bottom
: '5em'}], 10);
17 player
.currentTime
= 5;
18 element
.style
.fontSize
= '20px';
19 assert_equals(getComputedStyle(element
).bottom
, '80px');
20 }, 'bottom responsive to style changes');
23 element
.style
.fontSize
= '10px';
24 var player
= element
.animate([{height
: '3em'}, {height
: '5em'}], 10);
26 player
.currentTime
= 5;
27 element
.style
.fontSize
= '20px';
28 assert_equals(getComputedStyle(element
).height
, '80px');
29 }, 'height responsive to style changes');
32 element
.style
.fontSize
= '10px';
33 var player
= element
.animate([{letterSpacing
: '3em'}, {letterSpacing
: '5em'}], 10);
35 player
.currentTime
= 5;
36 element
.style
.fontSize
= '20px';
37 assert_equals(getComputedStyle(element
).letterSpacing
, '80px');
38 }, 'letterSpacing responsive to style changes');
41 var player
= element
.animate([{letterSpacing
: 'normal'}, {letterSpacing
: 'normal'}], 10);
43 player
.currentTime
= 5;
44 assert_equals(getComputedStyle(element
).letterSpacing
, 'normal');
45 }, 'letterSpacing can be normal');
48 element
.style
.fontSize
= '10px';
49 var player
= element
.animate([{marginRight
: '3em'}, {marginRight
: '5em'}], 10);
51 player
.currentTime
= 5;
52 element
.style
.fontSize
= '20px';
53 assert_equals(getComputedStyle(element
).marginRight
, '80px');
54 }, 'marginRight responsive to style changes');
57 element
.style
.fontSize
= '10px';
58 container
.style
.width
= '300px';
59 var player
= element
.animate([{marginRight
: '3em'}, {marginRight
: '50%'}], 10);
61 player
.currentTime
= 5;
62 element
.style
.fontSize
= '20px';
63 container
.style
.width
= '600px';
64 assert_equals(getComputedStyle(element
).marginRight
, '180px');
65 }, 'marginRight allows percentages');
68 element
.style
.fontSize
= '10px';
69 var player
= element
.animate([{outlineOffset
: '3em'}, {outlineOffset
: '5em'}], 10);
71 player
.currentTime
= 5;
72 element
.style
.outline
= 'dashed thin';
73 element
.style
.fontSize
= '20px';
74 assert_equals(getComputedStyle(element
).outlineOffset
, '80px');
75 }, 'outlineOffset responsive to style changes');
78 container
.style
.fontSize
= '10px';
79 var player
= container
.animate([{perspective
: '3em'}, {perspective
: '5em'}], 10);
81 player
.currentTime
= 5;
82 container
.style
.fontSize
= '20px';
83 assert_equals(getComputedStyle(container
).perspective
, '80px');
84 }, 'perspective responsive to style changes');
87 var player
= element
.animate([{perspective
: 'none'}, {perspective
: 'none'}], 10);
89 player
.currentTime
= 10;
90 assert_equals(getComputedStyle(element
).perspective
, 'none');
91 }, 'perspective can be none');
94 element
.style
.fontSize
= '10px';
95 var player
= element
.animate([{wordSpacing
: '3em'}, {wordSpacing
: '5em'}], 10);
97 player
.currentTime
= 5;
98 element
.style
.fontSize
= '20px';
99 assert_equals(getComputedStyle(element
).wordSpacing
, '80px');
100 }, 'wordSpacing responsive to style changes');