Files
sousa-gecko/testing/web-platform/tests/html/semantics/popovers/popover-active-document.html
T
Tim Nguyen 822106e616 Bug 1928830 [wpt PR 48945] - Fix typo in popover-active-document.html, a=testonly
Automatic update from web-platform-tests
Fix typo in popover-active-document.html (#48945)

Credits to https://github.com/WebKit/WebKit/pull/35990
--

wpt-commits: a396ad103b076a2df5e5f7c57f95986a45c961be
wpt-pr: 48945
2024-11-05 04:56:15 +00:00

18 lines
671 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
<link rel=help href="https://github.com/whatwg/html/pull/10705">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
const doc = document.implementation.createHTMLDocument();
const popover = doc.createElement('div');
popover.setAttribute('popover','');
doc.body.appendChild(popover);
assert_throws_dom('InvalidStateError',() => popover.showPopover());
assert_false(popover.matches(':popover-open'));
},'showPopover should throw when the document isn\'t active');
</script>