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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/Animation/constructor.html

Issue 2086283003: Update web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into wpt_import Created 4 years, 6 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/imported/wpt/web-animations/interfaces/Animation/constructor.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/Animation/constructor.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/Animation/constructor.html
index 10f99e96c7fb738d89754990bc5a0711c4b6fdac..1f7523364975ffcbe67d4deb66509e2d27df44a6 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/Animation/constructor.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/Animation/constructor.html
@@ -19,23 +19,43 @@ var gTestArguments = [
{
effect: null,
timeline: null,
+ expectedTimeline: null,
+ expectedTimelineDescription: "null",
description: "with null effect and null timeline"
},
{
effect: null,
timeline: document.timeline,
+ expectedTimeline: document.timeline,
+ expectedTimelineDescription: "document.timeline",
description: "with null effect and non-null timeline"
},
{
+ effect: null,
+ expectedTimeline: document.timeline,
+ expectedTimelineDescription: "document.timeline",
+ description: "with null effect and no timeline parameter"
+ },
+ {
effect: gEffect,
timeline: null,
+ expectedTimeline: null,
+ expectedTimelineDescription: "null",
description: "with non-null effect and null timeline"
},
{
effect: gEffect,
timeline: document.timeline,
+ expectedTimeline: document.timeline,
+ expectedTimelineDescription: "document.timeline",
description: "with non-null effect and non-null timeline"
},
+ {
+ effect: gEffect,
+ expectedTimeline: document.timeline,
+ expectedTimelineDescription: "document.timeline",
+ description: "with non-null effect and no timeline parameter"
+ },
];
gTestArguments.forEach(function(args) {
@@ -47,9 +67,8 @@ gTestArguments.forEach(function(args) {
assert_equals(animation.effect, args.effect,
"Animation returns the same effect passed to " +
"the Constructor");
- assert_equals(animation.timeline, args.timeline,
- "Animation returns the same timeline passed to " +
- "the Constructor");
+ assert_equals(animation.timeline, args.expectedTimeline,
+ "Animation timeline should be " + args.expectedTimelineDescription);
assert_equals(animation.playState, "idle",
"Animation.playState should be initially 'idle'");
}, "Animation can be constructed " + args.description);
@@ -69,5 +88,20 @@ test(function(t) {
assert_equals(effect.getComputedTiming().progress, 1.0);
}, "Animation constructed by an effect with null target runs normally");
+async_test(function(t) {
+ var iframe = document.createElement('iframe');
+
+ iframe.addEventListener('load', t.step_func(function() {
+ var div = createDiv(t, iframe.contentDocument);
+ var effect = new KeyframeEffectReadOnly(div, null, 10000);
+ var anim = new Animation(effect);
+ assert_equals(anim.timeline, document.timeline);
+ iframe.remove();
+ t.done();
+ }));
+
+ document.body.appendChild(iframe);
+}, "Animation constructed with a keyframe that target element is in iframe");
+
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698