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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/delay.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/delay.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/delay.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/delay.html
index d6e1cd904543003a7bcf1e8eba32a95e39bd4257..1b34f7dbe761c72d70fd6d7498b6fd18e207ef2c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/delay.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/delay.html
@@ -12,6 +12,11 @@
'use strict';
test(function(t) {
+ var anim = createDiv(t).animate(null);
+ assert_equals(anim.effect.timing.delay, 0);
+}, 'Test default value');
+
+test(function(t) {
var div = createDiv(t);
var anim = div.animate({ opacity: [ 0, 1 ] }, 100);
anim.effect.timing.delay = 100;
@@ -57,5 +62,18 @@ test(function(t) {
assert_equals(anim.effect.getComputedTiming().currentIteration, 0);
}, 'Test finishing an animation using a large negative delay');
+test(function(t) {
+ var div = createDiv(t);
+ var anim = div.animate(null);
+ for (let invalid of [NaN, Infinity]) {
+ assert_throws({ name: 'TypeError' }, function() {
+ anim.effect.timing.delay = invalid;
+ }, 'setting ' + invalid);
+ assert_throws({ name: 'TypeError' }, function() {
+ div.animate({}, { delay: invalid });
+ }, 'animate() with ' + invalid);
+ }
+}, 'Setting invalid values should throw TypeError');
+
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698