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

Unified Diff: third_party/WebKit/LayoutTests/web-animations-api/effect-of-keyframeeffect-on-getComputedTiming.html

Issue 2141863002: Rename TimedItem => ComputedTimingProperties and Timing => AnimationEffectTiming in test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/timed-item.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/web-animations-api/effect-of-keyframeeffect-on-getComputedTiming.html
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/timed-item.html b/third_party/WebKit/LayoutTests/web-animations-api/effect-of-keyframeeffect-on-getComputedTiming.html
similarity index 56%
rename from third_party/WebKit/LayoutTests/web-animations-api/timed-item.html
rename to third_party/WebKit/LayoutTests/web-animations-api/effect-of-keyframeeffect-on-getComputedTiming.html
index 10fd0c761a22678beb587e78e18e03e8fb611c67..dd4b79cd75e78400613a821042ce98c3ca5ed806 100644
--- a/third_party/WebKit/LayoutTests/web-animations-api/timed-item.html
+++ b/third_party/WebKit/LayoutTests/web-animations-api/effect-of-keyframeeffect-on-getComputedTiming.html
@@ -1,6 +1,9 @@
<!DOCTYPE html>
+<title>Things</title>
+<link rel="https://w3c.github.io/web-animations/#the-computedtimingproperties-dictionary">
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
+<script src="../imported/wpt/web-animations/testcommon.js"></script>
<body>
<div id='e'></div>
@@ -20,18 +23,18 @@ test(function() {
var animation = element.animate(keyframes, {fill: 'both', duration: 2000, iterations: 3});
var keyframeEffect = animation.effect;
animation.currentTime = -1000;
- assert_equals(keyframeEffect.getComputedTiming().localTime, -1000, 'localTime');
+ assert_times_equal(keyframeEffect.getComputedTiming().localTime, -1000, 'localTime');
assert_equals(keyframeEffect.getComputedTiming().currentIteration, 0);
animation.currentTime = 1000;
- assert_equals(keyframeEffect.getComputedTiming().localTime, 1000);
+ assert_times_equal(keyframeEffect.getComputedTiming().localTime, 1000);
assert_equals(keyframeEffect.getComputedTiming().currentIteration, 0);
animation.currentTime = 5000;
- assert_equals(keyframeEffect.getComputedTiming().localTime, 5000);
+ assert_times_equal(keyframeEffect.getComputedTiming().localTime, 5000);
assert_equals(keyframeEffect.getComputedTiming().currentIteration, 2);
animation.currentTime = 7000;
- assert_equals(keyframeEffect.getComputedTiming().localTime, 7000);
+ assert_times_equal(keyframeEffect.getComputedTiming().localTime, 7000);
assert_equals(keyframeEffect.getComputedTiming().currentIteration, 2);
-}, 'TimedItem.localTime and TimedItem.currentIteration return reasonable values when an keyframeEffect is in effect');
+}, 'ComputedTimingProperties.localTime and ComputedTimingProperties.currentIteration return reasonable values when an keyframeEffect is in effect');
test(function() {
var animation = element.animate(keyframes);
@@ -40,26 +43,26 @@ test(function() {
assert_equals(keyframeEffect.getComputedTiming().currentIteration, null);
animation.currentTime = 1;
assert_equals(keyframeEffect.getComputedTiming().currentIteration, null);
-}, 'TimedItem.currentIteration is null when keyframeEffect is not in effect');
+}, 'ComputedTimingProperties.currentIteration is null when keyframeEffect is not in effect');
test(function() {
var keyframeEffect = new KeyframeEffect(element, keyframes, 2);
- assert_equals(keyframeEffect.getComputedTiming().endTime, 2);
- assert_equals(keyframeEffect.getComputedTiming().duration, 2);
- assert_equals(keyframeEffect.getComputedTiming().activeDuration, 2);
-}, 'TimedItem startTime, endTime, duration, activeDuration are sensible for a simple keyframeEffect');
+ assert_times_equal(keyframeEffect.getComputedTiming().endTime, 2);
+ assert_times_equal(keyframeEffect.getComputedTiming().duration, 2);
+ assert_times_equal(keyframeEffect.getComputedTiming().activeDuration, 2);
+}, 'ComputedTimingProperties startTime, endTime, duration, activeDuration are sensible for a simple keyframeEffect');
test(function() {
var keyframeEffect = new KeyframeEffect(element, keyframes, {duration: 3, iterations: 4, delay: 5});
- assert_equals(keyframeEffect.getComputedTiming().endTime, 17);
- assert_equals(keyframeEffect.getComputedTiming().duration, 3);
- assert_equals(keyframeEffect.getComputedTiming().activeDuration, 12);
-}, 'TimedItem startTime, endTime, duration, activeDuration are sensible for keyframeEffects with delays and iterations');
+ assert_times_equal(keyframeEffect.getComputedTiming().endTime, 17);
+ assert_times_equal(keyframeEffect.getComputedTiming().duration, 3);
+ assert_times_equal(keyframeEffect.getComputedTiming().activeDuration, 12);
+}, 'ComputedTimingProperties startTime, endTime, duration, activeDuration are sensible for keyframeEffects with delays and iterations');
test(function() {
var keyframeEffect = new KeyframeEffect(element, keyframes, {delay: 1});
- assert_equals(keyframeEffect.getComputedTiming().duration, 0);
-}, 'TimedItem duration is calculated when no duration is specified');
+ assert_times_equal(keyframeEffect.getComputedTiming().duration, 0);
+}, 'ComputedTimingProperties duration is calculated when no duration is specified');
test(function() {
var timing = new KeyframeEffect(element, keyframes).timing;
@@ -67,6 +70,6 @@ test(function() {
assert_throws(new TypeError, function() { timing[attr] = NaN; }, attr);
assert_throws(new TypeError, function() { timing[attr] = Infinity; }, attr);
}
-}, 'Restricted double attributes on the Timing interface throws for non-finite values.');
+}, 'Restricted double attributes on the AnimationEffectTiming interface throws for non-finite values.');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/timed-item.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698