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

Side by Side Diff: LayoutTests/web-animations-api/timed-item.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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <body> 5 <body>
6 <div id='e'></div> 6 <div id='e'></div>
7 </body> 7 </body>
8 8
9 <script> 9 <script>
10 var element = document.getElementById('e'); 10 var element = document.getElementById('e');
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 assert_equals(animation.computedTiming.endTime, 17); 56 assert_equals(animation.computedTiming.endTime, 17);
57 assert_equals(animation.computedTiming.duration, 3); 57 assert_equals(animation.computedTiming.duration, 3);
58 assert_equals(animation.computedTiming.activeDuration, 12); 58 assert_equals(animation.computedTiming.activeDuration, 12);
59 }, 'TimedItem startTime, endTime, duration, activeDuration are sensible for anim ations with delays and iterations'); 59 }, 'TimedItem startTime, endTime, duration, activeDuration are sensible for anim ations with delays and iterations');
60 60
61 test(function() { 61 test(function() {
62 var animation = new Animation(element, keyframes, {delay: 1}); 62 var animation = new Animation(element, keyframes, {delay: 1});
63 assert_equals(animation.computedTiming.duration, 0); 63 assert_equals(animation.computedTiming.duration, 0);
64 }, 'TimedItem duration is calculated when no duration is specified'); 64 }, 'TimedItem duration is calculated when no duration is specified');
65 65
66 test(function() {
67 var timing = new Animation(element, keyframes).timing;
68 for (var attr of ['delay', 'endDelay', 'iterationStart', 'playbackRate']) {
69 assert_throws(new TypeError, function() { timing[attr] = NaN; }, attr);
70 assert_throws(new TypeError, function() { timing[attr] = Infinity; }, attr);
71 }
72 }, 'Restricted double attributes on the Timing interface throws for non-finite v alues.');
73
66 </script> 74 </script>
OLDNEW
« no previous file with comments | « LayoutTests/web-animations-api/player.html ('k') | LayoutTests/web-animations-api/timed-item-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698