Index: third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/local-time.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/local-time.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/local-time.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..91c1ed401c95d305985c31305342928cdafc62c4 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/local-time.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<meta charset=utf-8> |
+<title>AnimationEffect local time tests</title> |
+<link rel="help" href="https://w3c.github.io/web-animations/#local-time"> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script src="../../testcommon.js"></script> |
+<body> |
+<script> |
+'use strict'; |
+ |
+test(function(t) { |
+ var anim = createDiv(t).animate(null, 10 * MS_PER_SEC); |
+ for (var seconds of [-1, 0, 5, 10, 20]) { |
+ anim.currentTime = seconds * MS_PER_SEC; |
+ assert_equals(anim.effect.getComputedTiming().localTime, seconds * MS_PER_SEC); |
+ } |
+}, 'Local time is current time for animation effects associated with an animation'); |
+ |
+test(function(t) { |
+ var effect = new KeyframeEffect(createDiv(t), null, 10 * MS_PER_SEC); |
+ assert_equals(effect.getComputedTiming().localTime, null); |
+}, 'Local time is unresolved for animation effects not associated with an animation'); |
+ |
+</script> |
+</body> |