mirror of
https://github.com/servo/servo.git
synced 2025-08-29 17:18:23 +01:00
Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472
This commit is contained in:
parent
81ab255b70
commit
fd4e600639
57 changed files with 1735 additions and 208 deletions
|
@ -9,3 +9,29 @@ test(() => {
|
|||
assert_greater_than(types.indexOf("measure"), types.indexOf('mark'),
|
||||
"The 'measure' entry should appear after the 'mark' entry");
|
||||
}, "supportedEntryTypes contains 'mark' and 'measure'.");
|
||||
|
||||
if (typeof PerformanceObserver.supportedEntryTypes !== "undefined") {
|
||||
const entryTypes = {
|
||||
"mark": () => {
|
||||
performance.mark('foo');
|
||||
},
|
||||
"measure": () => {
|
||||
performance.measure('bar');
|
||||
}
|
||||
}
|
||||
for (let entryType in entryTypes) {
|
||||
if (PerformanceObserver.supportedEntryTypes.includes(entryType)) {
|
||||
promise_test(async() => {
|
||||
await new Promise((resolve) => {
|
||||
new PerformanceObserver(function (list, observer) {
|
||||
observer.disconnect();
|
||||
resolve();
|
||||
}).observe({entryTypes: [entryType]});
|
||||
|
||||
// Force the PerformanceEntry.
|
||||
entryTypes[entryType]();
|
||||
})
|
||||
}, `'${entryType}' entries should be observable.`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue