summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/popovers/popover-hover-crash-hang.tentative.html
blob: 60309398db0011227a89f4485f147d253358439f (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
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Crash/hang test for popover hover behavior</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel=help href="https://open-ui.org/components/popover-hint.research.explainer/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<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>

<div id=menu popover=manual>
  Popover
  <button popovertarget="submenu"><span id=button>Button</span>
    <div id=submenu popover=manual>Button-contained popover</div>
  </button>
</div>
<button id=unrelated>Unrelated</button>

<script>
   promise_test(async (t) => {
    menu.showPopover();
    assert_true(menu.matches(':popover-open'));
    await mouseHover(button,100);
    button.click();
    assert_true(menu.matches(':popover-open'));
    assert_true(submenu.matches(':popover-open'));
    await mouseHover(submenu,100);
    await mouseHover(unrelated,100);
    assert_true(submenu.matches(':popover-open'));
    // This test passes if nothing crashes/hangs.
   },'crash test');
</script>