summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/performance-timeline/buffered-flag-after-timeout.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/performance-timeline/buffered-flag-after-timeout.any.js')
-rw-r--r--testing/web-platform/tests/performance-timeline/buffered-flag-after-timeout.any.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/performance-timeline/buffered-flag-after-timeout.any.js b/testing/web-platform/tests/performance-timeline/buffered-flag-after-timeout.any.js
new file mode 100644
index 0000000000..08b3e32314
--- /dev/null
+++ b/testing/web-platform/tests/performance-timeline/buffered-flag-after-timeout.any.js
@@ -0,0 +1,11 @@
+async_test(t => {
+ performance.mark('foo');
+ t.step_timeout(() => {
+ // After a timeout, PerformanceObserver should still receive entry if using the buffered flag.
+ new PerformanceObserver(t.step_func_done(list => {
+ const entries = list.getEntries();
+ assert_equals(entries.length, 1, 'There should be 1 mark entry.');
+ assert_equals(entries[0].entryType, 'mark');
+ })).observe({type: 'mark', buffered: true});
+ }, 100);
+}, 'PerformanceObserver with buffered flag sees entry after timeout');