summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/performance-timeline/observer-buffered-false.any.js
blob: a28100b0fdba2e00579809a581935d312cf1245e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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.');