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

Unified Diff: third_party/WebKit/LayoutTests/web-animations-api/time-consistent-across-frames.html

Issue 2149053002: Prepare time-consistent-across-frames for upstreaming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/web-animations-api/time-consistent-across-frames.html
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/time-consistent-across-frames.html b/third_party/WebKit/LayoutTests/web-animations-api/time-consistent-across-frames.html
index f72f665680b54548a42dd5bfb15b8129a6e84445..eefc54bee7017880c70c7633c7185d930ba77720 100644
--- a/third_party/WebKit/LayoutTests/web-animations-api/time-consistent-across-frames.html
+++ b/third_party/WebKit/LayoutTests/web-animations-api/time-consistent-across-frames.html
@@ -1,23 +1,30 @@
<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Model liveness: currentTime will not change in a task (frames)</title>
+<link rel="help" href="https://w3c.github.io/web-animations/#model-liveness">
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
+<script src="../imported/wpt/web-animations/testcommon.js"></script>
<iframe id=frame></iframe>
<script>
-var handle = async_test('Animation time should tick consistently across frames');
+var handle = async_test('Document timeline should tick consistently across frames');
var baseTime = document.timeline.currentTime;
var frameBaseTime = frame.contentDocument.timeline.currentTime;
-setTimeout(function() {
+setTimeout(() => {
+ // Ensure that time in this task has advanced sufficiently for implementations
+ // that might bind the currentTime lazily.
var start = performance.now();
while (performance.now() - start < 30);
var delta = document.timeline.currentTime - baseTime;
+ // Advance time further before querying the frame's time.
var start = performance.now();
while (performance.now() - start < 30);
var frameDelta = frame.contentDocument.timeline.currentTime - frameBaseTime;
- handle.step(() => assert_equals(Math.round(delta), Math.round(frameDelta)));
+ handle.step(() => assert_times_equal(delta, frameDelta));
handle.done();
});
</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698