11cb0ef41Sopenharmony_ciasync_test( t=> { 21cb0ef41Sopenharmony_ci for (let i = 0; i < 50; i++) 31cb0ef41Sopenharmony_ci performance.mark('foo' + i); 41cb0ef41Sopenharmony_ci let marksCreated = 50; 51cb0ef41Sopenharmony_ci let marksReceived = 0; 61cb0ef41Sopenharmony_ci new PerformanceObserver(list => { 71cb0ef41Sopenharmony_ci marksReceived += list.getEntries().length; 81cb0ef41Sopenharmony_ci if (marksCreated < 100) { 91cb0ef41Sopenharmony_ci performance.mark('bar' + marksCreated); 101cb0ef41Sopenharmony_ci marksCreated++; 111cb0ef41Sopenharmony_ci } 121cb0ef41Sopenharmony_ci if (marksReceived == 100) 131cb0ef41Sopenharmony_ci t.done(); 141cb0ef41Sopenharmony_ci }).observe({type: 'mark', buffered: true}); 151cb0ef41Sopenharmony_ci}, 'PerformanceObserver with buffered flag should see past and future entries.'); 16