mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 093a97b6ecc6484c201d704d38b47bef1964d59d
This commit is contained in:
parent
16e4eb6964
commit
f9972c83e3
79 changed files with 1530 additions and 824 deletions
|
@ -65,12 +65,22 @@
|
|||
async_test(function(t) {
|
||||
clickTimeMin = performance.now();
|
||||
clickAndBlockMain('button');
|
||||
// Use a dummy observer to know when both clicks have been dispatched.
|
||||
const observerPromise = new Promise((resolve, reject) => {
|
||||
let entryCount = 0;
|
||||
new PerformanceObserver(entryList => {
|
||||
entryCount += entryList.getEntries().length;
|
||||
if (entryCount >= 2)
|
||||
resolve();
|
||||
}).observe({ entryTypes: ['event'] });
|
||||
});
|
||||
// Event handlers will be dispatched asynchronously, so this will be called
|
||||
// before processing begins.
|
||||
processingStartMin = performance.now();
|
||||
on_event(window, 'load', e => {
|
||||
onloadStart = performance.now();
|
||||
clickAndBlockMain('button').then(wait).then(
|
||||
const clickPromise = clickAndBlockMain('button');
|
||||
Promise.all([observerPromise, clickPromise]).then(
|
||||
t.step_func_done(validateEntries));
|
||||
});
|
||||
}, "Event Timing: click, onload.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue