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

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

Issue 1410313004: Web Animations: Use a single animation clock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <iframe id=frame></iframe>
6
7 <script>
8 var handle = async_test('Animation time should tick consistently across frames') ;
9 var baseTime = document.timeline.currentTime;
10 var frameBaseTime = frame.contentDocument.timeline.currentTime;
11 setTimeout(function() {
12 var start = performance.now();
13 while (performance.now() - start < 30);
14 var delta = document.timeline.currentTime - baseTime;
15
16 var start = performance.now();
17 while (performance.now() - start < 30);
18 var frameDelta = frame.contentDocument.timeline.currentTime - frameBaseTime;
19
20 handle.step(() => assert_equals(Math.round(delta), Math.round(frameDelta)));
21 handle.done();
22 });
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698