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

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

Issue 2212873003: W3C auto test importer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 1f7523364975ffcbe67d4deb66509e2d27df44a6..4f76194b6f05577fb5ce8a6c564f44beecbb2a81 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
@@ -13,45 +13,52 @@
"use strict";
var gTarget = document.getElementById("target");
-var gEffect = new KeyframeEffectReadOnly(gTarget, { opacity: [0, 1] });
+
+function createEffect() {
+ return new KeyframeEffectReadOnly(gTarget, { opacity: [0, 1] });
+}
+
+function createNull() {
+ return null;
+}
var gTestArguments = [
{
- effect: null,
+ createEffect: createNull,
timeline: null,
expectedTimeline: null,
expectedTimelineDescription: "null",
description: "with null effect and null timeline"
},
{
- effect: null,
+ createEffect: createNull,
timeline: document.timeline,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with null effect and non-null timeline"
},
{
- effect: null,
+ createEffect: createNull,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with null effect and no timeline parameter"
},
{
- effect: gEffect,
+ createEffect: createEffect,
timeline: null,
expectedTimeline: null,
expectedTimelineDescription: "null",
description: "with non-null effect and null timeline"
},
{
- effect: gEffect,
+ createEffect: createEffect,
timeline: document.timeline,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with non-null effect and non-null timeline"
},
{
- effect: gEffect,
+ createEffect: createEffect,
expectedTimeline: document.timeline,
expectedTimelineDescription: "document.timeline",
description: "with non-null effect and no timeline parameter"
@@ -60,11 +67,12 @@ var gTestArguments = [
gTestArguments.forEach(function(args) {
test(function(t) {
- var animation = new Animation(args.effect, args.timeline);
+ var effect = args.createEffect();
+ var animation = new Animation(effect, args.timeline);
assert_not_equals(animation, null,
"An animation sohuld be created");
- assert_equals(animation.effect, args.effect,
+ assert_equals(animation.effect, effect,
"Animation returns the same effect passed to " +
"the Constructor");
assert_equals(animation.timeline, args.expectedTimeline,

Powered by Google App Engine
This is Rietveld 408576698