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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterations.html

Issue 2711183003: Import wpt@a7e9c2abcf65b78fcf1c246fec6681c74e1bc352 (Closed)
Patch Set: Update test expectations and baselines. Created 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>iterations tests</title> 3 <title>iterations tests</title>
4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animationeffect timing-iterations"> 4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animationeffect timing-iterations">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <script src="../../testcommon.js"></script> 7 <script src="../../testcommon.js"></script>
8 <body> 8 <body>
9 <div id="log"></div> 9 <div id="log"></div>
10 <script> 10 <script>
11 'use strict'; 11 'use strict';
12 12
13 test(function(t) { 13 test(function(t) {
14 var anim = createDiv(t).animate(null);
15 assert_equals(anim.effect.timing.iterations, 1);
16 }, 'Test default value');
17
18 test(function(t) {
14 var div = createDiv(t); 19 var div = createDiv(t);
15 var anim = div.animate({ opacity: [ 0, 1 ] }, 2000); 20 var anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
16 anim.effect.timing.iterations = 2; 21 anim.effect.timing.iterations = 2;
17 assert_equals(anim.effect.timing.iterations, 2, 'set duration 2'); 22 assert_equals(anim.effect.timing.iterations, 2, 'set duration 2');
18 assert_equals(anim.effect.getComputedTiming().iterations, 2, 23 assert_equals(anim.effect.getComputedTiming().iterations, 2,
19 'getComputedTiming() after set iterations 2'); 24 'getComputedTiming() after set iterations 2');
20 }, 'set iterations 2'); 25 }, 'set iterations 2');
21 26
22 test(function(t) { 27 test(function(t) {
23 var div = createDiv(t); 28 var div = createDiv(t);
(...skipping 23 matching lines...) Expand all
47 test(function(t) { 52 test(function(t) {
48 var div = createDiv(t); 53 var div = createDiv(t);
49 var anim = div.animate({ opacity: [ 0, 1 ] }, 2000); 54 var anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
50 assert_throws({ name: 'TypeError' }, function() { 55 assert_throws({ name: 'TypeError' }, function() {
51 anim.effect.timing.iterations = NaN; 56 anim.effect.timing.iterations = NaN;
52 }); 57 });
53 }, 'set NaN iterations'); 58 }, 'set NaN iterations');
54 59
55 </script> 60 </script>
56 </body> 61 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698