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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
index 0273fd12b6a5f49b8aeee9ca7ca9b1d2e4c91a11..df3f992d4c2cde081519774d84d033feb293b00c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
@@ -12,6 +12,11 @@
'use strict';
test(function(t) {
+ var anim = createDiv(t).animate(null);
+ assert_equals(anim.effect.timing.iterationStart, 0);
+}, 'Test default value');
+
+test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] },
{ iterationStart: 0.2,
@@ -56,17 +61,16 @@ test(function(t) {
test(function(t) {
var div = createDiv(t);
- var anim = div.animate({ opacity: [ 0, 1 ] }, 100);
- assert_throws({ name: 'TypeError' },
- function() {
- anim.effect.timing.iterationStart = -1;
- });
- assert_throws({ name: 'TypeError' },
- function() {
- div.animate({ opacity: [ 0, 1 ] },
- { iterationStart: -1 });
- });
-}, 'Test invalid iterationStart value');
+ var anim = div.animate(null);
+ for (let invalid of [-1, NaN, Infinity]) {
+ assert_throws({ name: 'TypeError' }, function() {
+ anim.effect.timing.iterationStart = invalid;
+ }, 'setting ' + invalid);
+ assert_throws({ name: 'TypeError' }, function() {
+ div.animate({}, { iterationStart: invalid });
+ }, 'animate() with ' + invalid);
+ }
+}, 'Using invalid values should throw TypeError');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698