  window.activeElementBeforePageHide = document.activeElement;
    window.addEventListener('pagehide', () => {
      window.activeElementOnPageHide = document.activeElement;
    });
  },
  funcAfterAssertion: async (pageA) => {
    assert_true(
      await pageA.execute_script(() => {
          return window.activeElementBeforePageHide ===
                 document.querySelector('#toBeFocused');
      }),
      'activeElement before pagehide');

    assert_true(
      await pageA.execute_script(() => {
    