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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/hr-timestamp/constructed-events.html

Issue 1352523002: Use high precision timestamp for Event.timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <script type="text/javascript">
6 'use strict';
7 for (let eventType of [MouseEvent, KeyboardEvent, WheelEvent, GamepadEvent, Focu sEvent]) {
8 test(function() {
9 let now = performance.now();
10 let e = new eventType('test');
11 assert_approx_equals(e.timeStamp, now, 0.05, "Timestamp should be within 0.05 ms of the performance.now() when it was created");
Rick Byers 2015/09/25 17:29:33 This might be too sensitive to avoid flakiness (eg
majidvp 2015/09/29 14:21:31 Makes sense. Done.
12 }, `Constructed ${eventType.prototype.constructor.name} timestamp should be high resolution and have the same time origin as performance.now()`);
13 }
14 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698