• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1async_test( t=> {
2  for (let i = 0; i < 50; i++)
3    performance.mark('foo' + i);
4  let marksCreated = 50;
5  let marksReceived = 0;
6  new PerformanceObserver(list => {
7    marksReceived += list.getEntries().length;
8    if (marksCreated < 100) {
9      performance.mark('bar' + marksCreated);
10      marksCreated++;
11    }
12    if (marksReceived == 100)
13      t.done();
14  }).observe({type: 'mark', buffered: true});
15}, 'PerformanceObserver with buffered flag should see past and future entries.');
16