Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472

This commit is contained in:
WPT Sync Bot 2019-01-18 20:35:59 -05:00
parent 81ab255b70
commit fd4e600639
57 changed files with 1735 additions and 208 deletions

View file

@ -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.`)
}
}
}