chromium/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/showmodal-shadow-sibling-frame-crash.html

<!DOCTYPE html>
<html class=test-wait>
<link rel=author href="mailto:[email protected]">
<link rel=author href="mailto:[email protected]">
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=804047">

<template>
  <custom-dialog></custom-dialog>
</template>
<div id=shadow></div>
<iframe id=sibling></iframe>

<script>
customElements.define('custom-dialog',class extends HTMLElement {
  constructor() {
    super();
    this.attachShadow({mode: 'open'}).innerHTML = '<dialog></dialog>';
  }
  show() {
    this.shadowRoot.querySelector('dialog').showModal();
  }
});

onload = () => {
  const template = document.querySelector('template');
  const content = document.importNode(template.content, true);
  const dialog = content.querySelector('custom-dialog');
  document.querySelector('div').appendChild(dialog);
  dialog.show();
  document.documentElement.classList.remove('test-wait');
};
</script>