
  // Wait for the initial render to complete.
  await waitForAnimationFrames(2);

  const startTime = performance.now();
  return new Promise(resolve => {
    // First observer creates second in callback to ensure the entry has been dispatched by the time
    // the second observer begins observing.
    new PerformanceObserver(() => {
      const endTime = performance.now();
      // Second observer requires 'buffered: true' to see entries.
      new PerformanceObserver(t.step_func(list => {
        assert