1
0
Fork 0
firefox/testing/web-platform/tests/performance-timeline/observer-buffered-false.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

12 lines
576 B
JavaScript

async_test(t => {
performance.mark('foo');
// Use a timeout to ensure the remainder of the test runs after the entry is created.
t.step_timeout(() => {
// Observer with buffered flag set to false should not see entry.
new PerformanceObserver(() => {
assert_unreached('Should not have observed any entry!');
}).observe({type: 'mark', buffered: false});
// Use a timeout to give time to the observer.
t.step_timeout(t.step_func_done(() => {}), 100);
}, 0);
}, 'PerformanceObserver without buffered flag set to false cannot see past entries.');