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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/KeyframeEffect/composite.html

Issue 2610243002: Import wpt@5e1a3b80cea8d36774d2afd78b29a74792e9f15a (Closed)
Patch Set: Rebased Created 3 years, 11 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>KeyframeEffect.composite tests</title>
4 <link rel="help"
5 href="https://w3c.github.io/web-animations/#dom-keyframeeffect-composite">
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 <script>
12 'use strict';
13
14 test(function(t) {
15 var anim = createDiv(t).animate(null);
16 assert_equals(anim.effect.composite, 'replace',
17 'The default value should be replace');
18 }, 'Default value');
19
20 test(function(t) {
21 var anim = createDiv(t).animate(null);
22 anim.effect.composite = 'add';
23 assert_equals(anim.effect.composite, 'add',
24 'The effect composite value should be replaced');
25 }, 'Change composite value');
26
27 test(function(t) {
28 var anim = createDiv(t).animate({ left: '10px' });
29
30 anim.effect.composite = 'add';
31 var keyframes = anim.effect.getKeyframes();
32 assert_equals(keyframes[0].composite, undefined,
33 'unspecified keyframe composite value should be absent even ' +
34 'if effect composite is set');
35 }, 'Unspecified keyframe composite value when setting effect composite');
36
37 test(function(t) {
38 var anim = createDiv(t).animate({ left: '10px', composite: 'replace' });
39
40 anim.effect.composite = 'add';
41 var keyframes = anim.effect.getKeyframes();
42 assert_equals(keyframes[0].composite, 'replace',
43 'specified keyframe composite value should not be overridden ' +
44 'by setting effect composite');
45 }, 'Specified keyframe composite value when setting effect composite');
46
47 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698