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

@ -4,3 +4,22 @@ test(() => {
assert_true(PerformanceObserver.supportedEntryTypes.includes("paint"),
"There should be an entry 'paint' in PerformanceObserver.supportedEntryTypes");
}, "supportedEntryTypes contains 'paint'.");
if (typeof PerformanceObserver.supportedEntryTypes !== "undefined") {
const entryType = 'paint';
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.
// Use `self` for Workers.
if (self.document)
document.head.parentNode.appendChild(document.createTextNode('foo'));
})
}, `'${entryType}' entries should be observable.`)
}
}