mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 21:00:42 +02:00
Automatic update from web-platform-tests [idlharness] Accumulate skipped (ignored) deps over IdlArray lifetime (#17361) * Update interfaces/longtasks.idl Source: https://github.com/tidoust/reffy-reports/blob/087652c/whatwg/idl/longtasks.idl Build: https://travis-ci.org/tidoust/reffy-reports/builds/545077302 * Include attr deps for inherited interfaces * Fix regression * Update longtask-timing/idlharness.window.js Co-Authored-By: Philip Jägenstedt <philip@foolip.org> * Update resources/idlharness.js Co-Authored-By: Philip Jägenstedt <philip@foolip.org> * Update resources/idlharness.js * Update resources/idlharness.js Co-Authored-By: Philip Jägenstedt <philip@foolip.org> * Only avoid reencounters of actual definitions * Avoid duplicated NavigatorOnLine * Don't pull in untested attributes' types -- wpt-commits: 81ecbb89a1247048cb5be2ff9484efc1a687bb10 wpt-pr: 17361
36 lines
947 B
JavaScript
36 lines
947 B
JavaScript
// META: script=/resources/WebIDLParser.js
|
|
// META: script=/resources/idlharness.js
|
|
|
|
// https://w3c.github.io/longtasks/
|
|
|
|
'use strict';
|
|
|
|
idl_test(
|
|
['longtasks'],
|
|
['performance-timeline', 'hr-time'],
|
|
(idl_array, t) => new Promise((resolve, reject) => {
|
|
|
|
|
|
const longTask = () => {
|
|
const begin = self.performance.now();
|
|
while (self.performance.now() < begin + 100);
|
|
}
|
|
t.step_timeout(longTask, 0);
|
|
|
|
const observer = new PerformanceObserver(entryList => {
|
|
const entries = Array.from(entryList.getEntries());
|
|
const attribution = entries.reduce(
|
|
(sum, e) => sum.concat(e.attribution || []), []);
|
|
idl_array.add_objects({
|
|
PerformanceLongTaskTiming: entries,
|
|
TaskAttributionTiming: attribution,
|
|
});
|
|
resolve();
|
|
});
|
|
observer.observe({entryTypes: ['longtask']});
|
|
|
|
t.step_timeout(() => {
|
|
reject('longtask entry was not observed');
|
|
}, 1000);
|
|
})
|
|
);
|