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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-timestamp-high-resolution.html

Issue 2744553007: Upstream high resolution event timestamp tests to WPT (Closed)
Patch Set: Make WPT lint happy Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-timestamp-safe-resolution.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <script src="../../../resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 'use strict'; 6 'use strict';
7 for (let eventType of [MouseEvent, KeyboardEvent, WheelEvent, GamepadEvent, Focu sEvent]) { 7 for (let eventType of [MouseEvent, KeyboardEvent, WheelEvent, GamepadEvent, Focu sEvent]) {
8 test(function() { 8 test(function() {
9 let before = performance.now(); 9 let before = performance.now();
10 let e = new eventType('test'); 10 let e = new eventType('test');
11 let after = performance.now(); 11 let after = performance.now();
12 assert_greater_than_equal(e.timeStamp, before, "Event timestamp should b e greater than performance.now() timestamp taken before its creation"); 12 assert_greater_than_equal(e.timeStamp, before, "Event timestamp should b e greater than performance.now() timestamp taken before its creation");
13 assert_less_than_equal(e.timeStamp, after, "Event timestamp should be le ss than performance.now() timestamp taken after its creation"); 13 assert_less_than_equal(e.timeStamp, after, "Event timestamp should be le ss than performance.now() timestamp taken after its creation");
14 }, `Constructed ${eventType.prototype.constructor.name} timestamp should be high resolution and have the same time origin as performance.now()`); 14 }, `Constructed ${eventType.prototype.constructor.name} timestamp should be high resolution and have the same time origin as performance.now()`);
15 } 15 }
16 </script> 16 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-timestamp-safe-resolution.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698