summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/popovers/popover-dialog-crash.html
blob: e7579d5a3869958422fc07422fbb84124c8c635a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8" />
<title>Dialog-Popover crash</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<link rel=help href="https://html.spec.whatwg.org/multipage/popover.html">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/popover-utils.js"></script>

<p>This test passes if it does not crash.</p>
<dialog popover>This is a modal dialog</dialog>
<div popover>This is a popover</div>

<script>
  const dialog = document.querySelector('dialog[popover]');
  const popover = document.querySelector('div[popover]');
  dialog.showModal();
  popover.showPopover();
  clickOn(dialog)
    .then(() => {
      document.documentElement.classList.remove("reftest-wait");
    });
</script>