From 1f43ccebfad3a698e094976340a1a92207b9a18d Mon Sep 17 00:00:00 2001 From: Kramer Ge Date: Fri, 16 Oct 2020 09:59:25 +0000 Subject: [PATCH] Bug 1671358 [wpt PR 26119] - Revert "[Longtasks] Fix buffering before observer", a=testonly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 > Commit-Queue: Nicolás Peña Moreno > 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 Commit-Queue: Kramer Ge Cr-Commit-Position: refs/heads/master@{#817101} -- wpt-commits: 399db71122d26363cf3c5e41bb97b4ff06caf85c wpt-pr: 26119 --- .../longtask-before-observer.window.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 testing/web-platform/tests/longtask-timing/longtask-before-observer.window.js diff --git a/testing/web-platform/tests/longtask-timing/longtask-before-observer.window.js b/testing/web-platform/tests/longtask-timing/longtask-before-observer.window.js deleted file mode 100644 index b7d4eb9d1de1..000000000000 --- a/testing/web-platform/tests/longtask-timing/longtask-before-observer.window.js +++ /dev/null @@ -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.');