mirror of
https://github.com/servo/servo.git
synced 2025-08-30 09:38:19 +01:00
Update web-platform-tests to revision 4052654d786236b493d2df3cb80b9d3d1d0a8354
This commit is contained in:
parent
eab848df3e
commit
3b6ddd885a
116 changed files with 4255 additions and 821 deletions
|
@ -3,7 +3,7 @@
|
|||
<meta charset=utf-8 />
|
||||
<title>Event Timing: Performance observers can observe long-latency events
|
||||
</title>
|
||||
<button id='button' onclick='1'>Generate a 'click' event</button>
|
||||
<button id='button'>Generate a 'click' event</button>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/resources/testdriver.js></script>
|
||||
|
@ -77,7 +77,8 @@
|
|||
async_test(function(t) {
|
||||
const observerPromise = new Promise((resolve, reject) => {
|
||||
new PerformanceObserver(function(entryList) {
|
||||
observedEntries = observedEntries.concat(entryList.getEntries());
|
||||
observedEntries = observedEntries.concat(entryList.getEntries().filter(
|
||||
entry => entry.name === 'mousedown'));
|
||||
if (observedEntries.length < 2) return;
|
||||
resolve(observedEntries);
|
||||
}).observe({ entryTypes: ['event'] });
|
||||
|
@ -93,7 +94,7 @@
|
|||
Promise.all([observerPromise, bufferPromise]).then((results) => {
|
||||
timeAfterSecondClick = performance.now();
|
||||
t.step(verifyObserverEntries.bind(null, results[0]));
|
||||
t.step(verifyBuffer.bind(null, performance.getEntriesByName('click', 'event')));
|
||||
t.step(verifyBuffer.bind(null, performance.getEntriesByName('mousedown', 'event')));
|
||||
t.done();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue