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([{perspective
: '3em'}, {perspective
: '5em'}], 10);
17 player
.currentTime
= 5;
18 element
.style
.fontSize
= '20px';
19 assert_equals(getComputedStyle(element
).perspective
, '80px');
20 }, 'perspective responsive to style changes');
23 element
.style
.fontSize
= '10px';
24 var player
= element
.animate([{perspective
: '40px'}, {perspective
: 'calc(40px - 2em)'}], 10);
27 player
.currentTime
= 5;
28 element
.style
.fontSize
= '40px';
29 assert_equals(getComputedStyle(element
).perspective
, 'none');
31 player
.currentTime
= 7.5;
32 assert_equals(getComputedStyle(element
).perspective
, 'none');
33 }, 'perspective clamped to none');