2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
10 var element
= document
.getElementById('e');
11 var keyframes
= [{opacity
: '1', offset
: 0}, {opacity
: '0', offset
: 1}];
13 var specifiedTiming
= new KeyframeEffect(element
, keyframes
).timing
;
16 specifiedTiming
.delay
= 2;
17 assert_equals(specifiedTiming
.delay
, 2);
19 specifiedTiming
.endDelay
= 0.5;
20 assert_equals(specifiedTiming
.endDelay
, 0.5);
22 specifiedTiming
.fill
= 'backwards';
23 assert_equals(specifiedTiming
.fill
, 'backwards');
25 specifiedTiming
.iterationStart
= 2;
26 assert_equals(specifiedTiming
.iterationStart
, 2);
28 specifiedTiming
.iterations
= 10;
29 assert_equals(specifiedTiming
.iterations
, 10);
31 specifiedTiming
.duration
= 5;
32 assert_equals(specifiedTiming
.duration
, 5);
33 specifiedTiming
.duration
= '6';
34 assert_equals(specifiedTiming
.duration
, 'auto');
35 specifiedTiming
.duration
= 'auto';
36 assert_equals(specifiedTiming
.duration
, 'auto');
37 specifiedTiming
.duration
= 'a';
38 assert_equals(specifiedTiming
.duration
, 'auto');
39 specifiedTiming
.duration
= '-1';
40 assert_equals(specifiedTiming
.duration
, 'auto');
42 specifiedTiming
.playbackRate
= 2;
43 assert_equals(specifiedTiming
.playbackRate
, 2);
45 specifiedTiming
.direction
= 'reverse';
46 assert_equals(specifiedTiming
.direction
, 'reverse');
48 specifiedTiming
.easing
= "step-start";
49 assert_equals(specifiedTiming
.easing
, 'step-start');
50 }, 'TimedItem.timing should have a setter for each member of the underlying Timing object.');