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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/animation/constructor.html

Issue 1866333004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wpt-sync
Patch Set: Add Failure option for two TestExpectations entries Created 4 years, 8 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/web-platform-tests/web-animations/animation/constructor.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/animation/constructor.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/animation/constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..2ea07710cfeea48d4d333b06b26969c36c2a07cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/animation/constructor.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Animation constructor tests</title>
+<link rel="help" href="http://w3c.github.io/web-animations/#dom-animation-animation">
+<link rel="author" title="Hiroyuki Ikezoe" href="mailto:hiikezoe@mozilla-japan.org">
+<script src="../../../../resources/testharness.js"></script>
+<script src="../../../../resources/testharnessreport.js"></script>
+<script src="../testcommon.js"></script>
+<body>
+<div id="log"></div>
+<div id="target"></div>
+<script>
+"use strict";
+
+var gTarget = document.getElementById("target");
+var gEffect = new KeyframeEffectReadOnly(gTarget, { opacity: [0, 1] });
+
+var gTestArguments = [
+ {
+ effect: null,
+ timeline: null,
+ description: "with null effect and null timeline"
+ },
+ {
+ effect: null,
+ timeline: document.timeline,
+ description: "with null effect and non-null timeline"
+ },
+ {
+ effect: gEffect,
+ timeline: null,
+ description: "with non-null effect and null timeline"
+ },
+ {
+ effect: gEffect,
+ timeline: document.timeline,
+ description: "with non-null effect and non-null timeline"
+ },
+];
+
+gTestArguments.forEach(function(args) {
+ test(function(t) {
+ var animation = new Animation(args.effect, args.timeline);
+
+ assert_not_equals(animation, null,
+ "An animation sohuld be created");
+ 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.playState, "idle",
+ "Animation.playState should be initially 'idle'");
+ }, "Animation can be constructed " + args.description);
+});
+
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698