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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation/constructor.html

Issue 1999243002: Import wpt@5df9b57edb3307a87d5187804b29c8ddd2aa14e1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add expectations files (using run-webkit-tests --new-baseline) 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Animation constructor tests</title>
4 <link rel="help" href="http://w3c.github.io/web-animations/#dom-animation-animat ion">
5 <link rel="author" title="Hiroyuki Ikezoe" href="mailto:hiikezoe@mozilla-japan.o rg">
6 <script src="../../../../resources/testharness.js"></script>
7 <script src="../../../../resources/testharnessreport.js"></script>
8 <script src="../testcommon.js"></script>
9 <body>
10 <div id="log"></div>
11 <div id="target"></div>
12 <script>
13 "use strict";
14
15 var gTarget = document.getElementById("target");
16 var gEffect = new KeyframeEffectReadOnly(gTarget, { opacity: [0, 1] });
17
18 var gTestArguments = [
19 {
20 effect: null,
21 timeline: null,
22 description: "with null effect and null timeline"
23 },
24 {
25 effect: null,
26 timeline: document.timeline,
27 description: "with null effect and non-null timeline"
28 },
29 {
30 effect: gEffect,
31 timeline: null,
32 description: "with non-null effect and null timeline"
33 },
34 {
35 effect: gEffect,
36 timeline: document.timeline,
37 description: "with non-null effect and non-null timeline"
38 },
39 ];
40
41 gTestArguments.forEach(function(args) {
42 test(function(t) {
43 var animation = new Animation(args.effect, args.timeline);
44
45 assert_not_equals(animation, null,
46 "An animation sohuld be created");
47 assert_equals(animation.effect, args.effect,
48 "Animation returns the same effect passed to " +
49 "the Constructor");
50 assert_equals(animation.timeline, args.timeline,
51 "Animation returns the same timeline passed to " +
52 "the Constructor");
53 assert_equals(animation.playState, "idle",
54 "Animation.playState should be initially 'idle'");
55 }, "Animation can be constructed " + args.description);
56 });
57
58 </script>
59 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698