
  const popover = document.querySelector('[popover]');
  const testText = 'Show Event Occurred';
  popover.addEventListener('beforetoggle',(e) => {
    assert_false(e.bubbles, 'beforetoggle event does not bubble');
    if (e.newState !== "open")
      return;
    popover.textContent = testText;
  })
  popover.offsetHeight;
  assert_equals(popover.textContent,"");
  assert_equals(frameCount,0);
  popover.showPopover();
  popover.offsetHeight;
  assert_equals(popover.textContent,testText);
  assert_equals(fr