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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/local-time.html

Issue 2711183003: Import wpt@a7e9c2abcf65b78fcf1c246fec6681c74e1bc352 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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/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>

Powered by Google App Engine
This is Rietveld 408576698