Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[popover] Reset state in some subtests #39304

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions html/semantics/popovers/popover-light-dismiss.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
assert_false(popover1.matches(':open'),'pointerup (outside the popover) should trigger light dismiss');
},'Popovers close on pointerup, not pointerdown');

promise_test(async () => {
promise_test(async (t) => {
t.add_cleanup(() => popover1.hidePopover());
assert_false(popover1.matches(':open'));
popover1.showPopover();
assert_true(popover1.matches(':open'));
Expand All @@ -132,17 +133,16 @@
await testOne('pointerdown');
await testOne('mouseup');
await testOne('mousedown');
popover1.hidePopover();
},'Synthetic events can\'t close popovers');

promise_test(async () => {
promise_test(async (t) => {
t.add_cleanup(() => popover1.hidePopover());
popover1.showPopover();
await clickOn(inside1After);
assert_true(popover1.matches(':open'));
await sendTab();
assert_equals(document.activeElement,afterp1,'Focus should move to a button outside the popover');
assert_true(popover1.matches(':open'));
popover1.hidePopover();
},'Moving focus outside the popover should not dismiss the popover');

promise_test(async () => {
Expand Down