OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 | 8 |
9 description("This tests the constructor for the WebKitAnimationEvent DOM class."
); | 9 description("This tests the constructor for the WebKitAnimationEvent DOM class."
); |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: [1
, 2, 3] }).animationName", "1,2,3"); | 39 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: [1
, 2, 3] }).animationName", "1,2,3"); |
40 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: {d
oremi: 12345} }).animationName", "[object Object]"); | 40 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: {d
oremi: 12345} }).animationName", "[object Object]"); |
41 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: {v
alueOf: function () { return 'doremi'; } } }).animationName", "[object Object]")
; | 41 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: {v
alueOf: function () { return 'doremi'; } } }).animationName", "[object Object]")
; |
42 | 42 |
43 // elapsedTime is passed. | 43 // elapsedTime is passed. |
44 // Numeric values. | 44 // Numeric values. |
45 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 0 }).elapsedTime"
, "0"); | 45 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 0 }).elapsedTime"
, "0"); |
46 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 123.45 }).elapsed
Time", "123.45"); | 46 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 123.45 }).elapsed
Time", "123.45"); |
47 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: -123.45 }).elapse
dTime", "-123.45"); | 47 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: -123.45 }).elapse
dTime", "-123.45"); |
48 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 18446744073709551
615 }).elapsedTime", "18446744073709551615"); | 48 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 18446744073709551
615 }).elapsedTime", "18446744073709551615"); |
49 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTim
e", "NaN"); | 49 shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsed
Time"); |
50 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elaps
edTime", "Infinity"); | 50 shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).el
apsedTime"); |
51 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elap
sedTime", "-Infinity"); | 51 shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).e
lapsedTime"); |
52 | 52 |
53 // Non-numeric values. | 53 // Non-numeric values. |
54 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elap
sedTime", "0"); | 54 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elap
sedTime", "0"); |
55 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: null }).elapsedTi
me", "0"); | 55 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: null }).elapsedTi
me", "0"); |
56 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: false }).elapsedT
ime", "0"); | 56 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: false }).elapsedT
ime", "0"); |
57 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: true }).elapsedTi
me", "1"); | 57 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: true }).elapsedTi
me", "1"); |
58 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: '' }).elapsedTime
", "0"); | 58 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: '' }).elapsedTime
", "0"); |
59 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elaps
edTime", "NaN"); | 59 shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).el
apsedTime"); |
60 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [] }).elapsedTime
", "0"); | 60 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [] }).elapsedTime
", "0"); |
61 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45] }).elaps
edTime", "123.45"); | 61 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45] }).elaps
edTime", "123.45"); |
62 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90]
}).elapsedTime", "NaN"); | 62 shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.9
0] }).elapsedTime"); |
63 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45}
}).elapsedTime", "NaN"); | 63 shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.4
5} }).elapsedTime"); |
64 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: {valueOf: functio
n () { return 123.45 } } }).elapsedTime", "123.45"); | 64 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: {valueOf: functio
n () { return 123.45 } } }).elapsedTime", "123.45"); |
65 | 65 |
66 // All initializers are passed. | 66 // All initializers are passed. |
67 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).bubbles", "true"); | 67 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).bubbles", "true"); |
68 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).cancelable", "true"); | 68 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).cancelable", "true"); |
69 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).animationName", "'doremi'"); | 69 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).animationName", "'doremi'"); |
70 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).elapsedTime", "123.45"); | 70 shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: tru
e, animationName: 'doremi', elapsedTime: 123.45 }).elapsedTime", "123.45"); |
71 </script> | 71 </script> |
72 </body> | 72 </body> |
73 </html> | 73 </html> |
OLD | NEW |