al suspended timer will fire.
      // Alternatively, if the browser reloads the page the original
      // message will be sent again.  Wait for either of these
      // two events.
      return Promise.race([wait_for_message('foo'), innerDelay]);
    }).then(_ => {
      win.close();
    });
  });
}, 'history.back() handles top level page timer correctly');

promise_test(t => {
  let win;
  // Create a new window so we can navigate it later.
  return with_window_by_name('foo').then(w => {
    win = w;

  