mirror of
https://github.com/servo/servo.git
synced 2025-09-04 03:58:23 +01:00
Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d
This commit is contained in:
parent
85fa6409bb
commit
c227604a2c
997 changed files with 45660 additions and 14650 deletions
|
@ -4,13 +4,13 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script type="text/javascript">
|
||||
'use strict';
|
||||
for (let eventType of [MouseEvent, KeyboardEvent, WheelEvent, GamepadEvent, FocusEvent]) {
|
||||
for (let eventType of ["MouseEvent", "KeyboardEvent", "WheelEvent", "GamepadEvent", "FocusEvent"]) {
|
||||
test(function() {
|
||||
let before = performance.now();
|
||||
let e = new eventType('test');
|
||||
let e = new window[eventType]('test');
|
||||
let after = performance.now();
|
||||
assert_greater_than_equal(e.timeStamp, before, "Event timestamp should be greater than performance.now() timestamp taken before its creation");
|
||||
assert_less_than_equal(e.timeStamp, after, "Event timestamp should be less than performance.now() timestamp taken after its creation");
|
||||
}, `Constructed ${eventType.prototype.constructor.name} timestamp should be high resolution and have the same time origin as performance.now()`);
|
||||
}, `Constructed ${eventType} timestamp should be high resolution and have the same time origin as performance.now()`);
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue