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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/KeyframeEffect/spacing.html

Issue 2408493002: Import wpt@357b83b809e3cbc7a1805e7c3ca108a7980d782f (Closed)
Patch Set: Added one more win7-specific baseline Created 4 years, 2 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/KeyframeEffect/spacing.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/KeyframeEffect/spacing.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/KeyframeEffect/spacing.html
new file mode 100644
index 0000000000000000000000000000000000000000..612a3af8d9edb4b3a3e37dddc2c5c76bf7de0a23
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/interfaces/KeyframeEffect/spacing.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>KeyframeEffect spacing attribute tests</title>
+<link rel="help"
+ href="https://w3c.github.io/web-animations/#dom-keyframeeffect-spacing">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../testcommon.js"></script>
+<body>
+<div id="log"></div>
+<script>
+"use strict";
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ assert_throws(new TypeError, function() {
+ anim.effect.spacing = '';
+ });
+}, 'Test throwing TypeError if using empty string');
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ assert_throws(new TypeError, function() {
+ anim.effect.spacing = 'dist';
+ });
+}, 'Test throwing TypeError if not using the correct keyword');
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ anim.effect.spacing = 'paced(A)';
+ assert_equals(anim.effect.spacing, 'distribute', 'spacing mode');
+}, 'Test falling back to distribute spacing if using a unrecognized property');
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ anim.effect.spacing = 'paced(--bg-color)';
+ assert_equals(anim.effect.spacing, 'distribute', 'spacing mode');
+}, 'Test falling back to distribute spacing if using CSS variables');
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ anim.effect.spacing = 'paced(animation-duration)';
+ assert_equals(anim.effect.spacing, 'distribute', 'spacing mode');
+}, 'Test falling back to distribute spacing if using a non-animatable ' +
+ 'property');
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ anim.effect.spacing = 'distribute';
+ assert_equals(anim.effect.spacing, 'distribute', 'spacing mode');
+}, 'Test spacing value if setting distribute');
+
+test(function(t) {
+ var anim = createDiv(t).animate(null);
+ anim.effect.spacing = 'paced(transform)';
+ assert_equals(anim.effect.spacing, 'paced(transform)', 'spacing mode');
+}, 'Test spacing value if setting paced');
+
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698