Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: LayoutTests/fast/events/constructors/animation-event-constructor.html

Issue 939623002: Add TypeChecking=Unrestricted to Web Animation APIs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop AnimationAnimationPlayerTest.SetCurrentTimeUnrestrictedDouble Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/animation-event-constructor-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 AnimationEvent DOM class."); 9 description("This tests the constructor for the AnimationEvent DOM class.");
10 10
(...skipping 28 matching lines...) Expand all
39 shouldBeEqualToString("new AnimationEvent('eventType', { animationName: [1, 2, 3 ] }).animationName", "1,2,3"); 39 shouldBeEqualToString("new AnimationEvent('eventType', { animationName: [1, 2, 3 ] }).animationName", "1,2,3");
40 shouldBeEqualToString("new AnimationEvent('eventType', { animationName: {doremi: 12345} }).animationName", "[object Object]"); 40 shouldBeEqualToString("new AnimationEvent('eventType', { animationName: {doremi: 12345} }).animationName", "[object Object]");
41 shouldBeEqualToString("new AnimationEvent('eventType', { animationName: {valueOf : function () { return 'doremi'; } } }).animationName", "[object Object]"); 41 shouldBeEqualToString("new AnimationEvent('eventType', { animationName: {valueOf : 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 AnimationEvent('eventType', { elapsedTime: 0 }).elapsedTime", "0") ; 45 shouldBe("new AnimationEvent('eventType', { elapsedTime: 0 }).elapsedTime", "0") ;
46 shouldBe("new AnimationEvent('eventType', { elapsedTime: 123.45 }).elapsedTime", "123.45"); 46 shouldBe("new AnimationEvent('eventType', { elapsedTime: 123.45 }).elapsedTime", "123.45");
47 shouldBe("new AnimationEvent('eventType', { elapsedTime: -123.45 }).elapsedTime" , "-123.45"); 47 shouldBe("new AnimationEvent('eventType', { elapsedTime: -123.45 }).elapsedTime" , "-123.45");
48 shouldBe("new AnimationEvent('eventType', { elapsedTime: 18446744073709551615 }) .elapsedTime", "18446744073709551615"); 48 shouldBe("new AnimationEvent('eventType', { elapsedTime: 18446744073709551615 }) .elapsedTime", "18446744073709551615");
49 shouldBe("new AnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime", "N aN"); 49 shouldThrow("new AnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime") ;
50 shouldBe("new AnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime ", "Infinity"); 50 shouldThrow("new AnimationEvent('eventType', { elapsedTime: Infinity }).elapsedT ime");
51 shouldBe("new AnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTim e", "-Infinity"); 51 shouldThrow("new AnimationEvent('eventType', { elapsedTime: -Infinity }).elapsed Time");
52 52
53 // Non-numeric values. 53 // Non-numeric values.
54 shouldBe("new AnimationEvent('eventType', { elapsedTime: undefined }).elapsedTim e", "0"); 54 shouldBe("new AnimationEvent('eventType', { elapsedTime: undefined }).elapsedTim e", "0");
55 shouldBe("new AnimationEvent('eventType', { elapsedTime: null }).elapsedTime", " 0"); 55 shouldBe("new AnimationEvent('eventType', { elapsedTime: null }).elapsedTime", " 0");
56 shouldBe("new AnimationEvent('eventType', { elapsedTime: false }).elapsedTime", "0"); 56 shouldBe("new AnimationEvent('eventType', { elapsedTime: false }).elapsedTime", "0");
57 shouldBe("new AnimationEvent('eventType', { elapsedTime: true }).elapsedTime", " 1"); 57 shouldBe("new AnimationEvent('eventType', { elapsedTime: true }).elapsedTime", " 1");
58 shouldBe("new AnimationEvent('eventType', { elapsedTime: '' }).elapsedTime", "0" ); 58 shouldBe("new AnimationEvent('eventType', { elapsedTime: '' }).elapsedTime", "0" );
59 shouldBe("new AnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime ", "NaN"); 59 shouldThrow("new AnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedT ime");
60 shouldBe("new AnimationEvent('eventType', { elapsedTime: [] }).elapsedTime", "0" ); 60 shouldBe("new AnimationEvent('eventType', { elapsedTime: [] }).elapsedTime", "0" );
61 shouldBe("new AnimationEvent('eventType', { elapsedTime: [123.45] }).elapsedTime ", "123.45"); 61 shouldBe("new AnimationEvent('eventType', { elapsedTime: [123.45] }).elapsedTime ", "123.45");
62 shouldBe("new AnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).ela psedTime", "NaN"); 62 shouldThrow("new AnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }). elapsedTime");
63 shouldBe("new AnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).ela psedTime", "NaN"); 63 shouldThrow("new AnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }). elapsedTime");
64 shouldBe("new AnimationEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45"); 64 shouldBe("new AnimationEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45");
65 65
66 // All initializers are passed. 66 // All initializers are passed.
67 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).bubbles", "true"); 67 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).bubbles", "true");
68 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).cancelable", "true"); 68 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).cancelable", "true");
69 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).animationName", "'doremi'"); 69 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).animationName", "'doremi'");
70 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).elapsedTime", "123.45"); 70 shouldBe("new AnimationEvent('eventType', { bubbles: true, cancelable: true, ani mationName: 'doremi', elapsedTime: 123.45 }).elapsedTime", "123.45");
71 </script> 71 </script>
72 </body> 72 </body>
73 </html> 73 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/animation-event-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698