зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1671358 [wpt PR 26119] - Revert "[Longtasks] Fix buffering before observer", a=testonly
Automatic update from web-platform-tests Revert "[Longtasks] Fix buffering before observer" This reverts commit c2d62d3604e218cfd1b62877684c634980aea3f7. Reason for revert: suspect for crbug.com/1138522 Original change's description: > [Longtasks] Fix buffering before observer > > When we shipped longtasks with buffered flag, we forgot to remove a > check that would prevent longtask creation when there's no observer. > This CL fixes this and adds a test for this case. It also moves the > UseCounter to the observe() method. > > Bug: 1131385 > Change-Id: I2911b9ab044db7394bcf64f64b1e599959cbdc37 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463594 > Reviewed-by: Steve Kobes <skobes@chromium.org> > Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> > Cr-Commit-Position: refs/heads/master@{#816664} TBR=skobes@chromium.org,npm@chromium.org Change-Id: I03483b9cc1e8ce03b518d90df16e54e4503f5ffc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1131385 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2472258 Reviewed-by: Kramer Ge <fangzhoug@chromium.org> Commit-Queue: Kramer Ge <fangzhoug@chromium.org> Cr-Commit-Position: refs/heads/master@{#817101} -- wpt-commits: 399db71122d26363cf3c5e41bb97b4ff06caf85c wpt-pr: 26119
This commit is contained in:
Родитель
11d8562b4d
Коммит
1f43ccebfa
|
@ -1,16 +0,0 @@
|
|||
async_test(t => {
|
||||
assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
|
||||
// Create a long task before any observer.
|
||||
const begin = window.performance.now();
|
||||
while (window.performance.now() < begin + 60);
|
||||
// After a timeout, add an observer with buffered flag.
|
||||
t.step_timeout(() => {
|
||||
new PerformanceObserver(t.step_func_done(list => {
|
||||
list.getEntries().forEach(entry => {
|
||||
assert_equals(entry.entryType, 'longtask');
|
||||
assert_equals(entry.name, 'self');
|
||||
assert_greater_than(entry.duration, 50);
|
||||
});
|
||||
})).observe({type: 'longtask', buffered: true});
|
||||
}, 0);
|
||||
}, 'PerformanceObserver with buffered flag can see previous longtask entries.');
|
Загрузка…
Ссылка в новой задаче