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

Rename popup=async to popup=manual #34567

Merged
merged 1 commit into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions html/semantics/popups/popup-attribute-basic.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div popup="">Pop up</div>
<div popup=auto>Pop up</div>
<div popup=hint>Pop up</div>
<div popup=async>Pop up</div>
<div popup=manual>Pop up</div>
</div>

<div id=nonpopups>
Expand Down Expand Up @@ -158,7 +158,7 @@
assert_false(popUp.matches(':top-layer'));
popUp.showPopUp();
assert_true(popUp.matches(':top-layer'));
popUp.setAttribute('popup','async');
popUp.setAttribute('popup','manual');
assert_false(popUp.matches(':top-layer'));
popUp.showPopUp();
assert_true(popUp.matches(':top-layer'));
Expand All @@ -175,7 +175,7 @@
}
}

["auto","hint","async"].forEach(type => {
["auto","hint","manual"].forEach(type => {
test((t) => {
const popUp = createPopUp(t);
popUp.setAttribute('popup',type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if there are 3 stacked boxes, with the brightest green on top.</p>
<div popup id=bottom>Bottom
<div popup=hint id=middle>Middle
<div popup=async id=top>Top</div>
<div popup=manual id=top>Top</div>
</div>
</div>
<div id="bottom-backdrop" class="backdrop"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
if there are 3 stacked boxes, with the brightest green on top.</p>
<div popup id=bottom>Bottom
<div popup=hint id=middle>Middle
<div popup=async id=top>Top</div>
<div popup=manual id=top>Top</div>
</div>
</div>
<script>
Expand Down
8 changes: 4 additions & 4 deletions html/semantics/popups/popup-defaultopen.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div popup=hint id=p2b defaultopen>This is a hint popup with defaultopen, which should NOT be open upon load</div>
<div popup id=p3>Also not visible</div>

<div popup=async id=p4 defaultopen>This is an async popup with defaultopen, which should be open upon load</div>
<div popup=async id=p5 defaultopen>This is an async popup with defaultopen, which should be open upon load</div>
<div popup=manual id=p4 defaultopen>This is a manual popup with defaultopen, which should be open upon load</div>
<div popup=manual id=p5 defaultopen>This is a manual popup with defaultopen, which should be open upon load</div>

<script>
requestAnimationFrame(() => {
Expand All @@ -26,8 +26,8 @@
assert_true(p2.defaultOpen,'defaultopen should be present/true, even if not opened');

assert_false(p2b.matches(':top-layer'),'Only the first popup/hint with defaultopen should be open on load');
assert_true(p4.matches(':top-layer'),'defaultopen should open all async popups');
assert_true(p5.matches(':top-layer'),'defaultopen should open all async popups');
assert_true(p4.matches(':top-layer'),'defaultopen should open all manual popups');
assert_true(p5.matches(':top-layer'),'defaultopen should open all manual popups');

assert_false(p3.matches(':top-layer'));
p3.setAttribute('defaultopen','');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
supported: false,
},
];
["auto","hint","async"].forEach(type => {
["auto","hint","manual"].forEach(type => {
invokers.forEach(testcase => {
let t_set = [1], s_set = [1], h_set = [1];
if (testcase.supported) {
Expand Down
18 changes: 9 additions & 9 deletions html/semantics/popups/popup-light-dismiss.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@

<div popup id=p10>Popup</div>
<div popup=hint id=p11>Hint</div>
<div popup=async id=p12>Async</div>
<div popup=manual id=p12>Manual</div>
<style>
#p10 {top:100px;}
#p11 {top:200px;}
Expand All @@ -427,26 +427,26 @@
promise_test(async () => {
const popup = document.querySelector('#p10');
const hint = document.querySelector('#p11');
const async = document.querySelector('#p12');
const manual = document.querySelector('#p12');
// All three can be open at once, if shown in this order:
popup.showPopUp();
hint.showPopUp();
async.showPopUp();
manual.showPopUp();
assert_true(popup.matches(':top-layer'));
assert_true(hint.matches(':top-layer'));
assert_true(async.matches(':top-layer'));
assert_true(manual.matches(':top-layer'));
// The hint was opened last, so clicking it shouldn't close anything:
await clickOn(hint);
assert_true(popup.matches(':top-layer'),'popup should stay open');
assert_true(hint.matches(':top-layer'),'hint should stay open');
assert_true(async.matches(':top-layer'),'async does not light dismiss');
// Clicking outside should close the hint and popup, but not the async:
assert_true(manual.matches(':top-layer'),'manual does not light dismiss');
// Clicking outside should close the hint and popup, but not the manual:
await clickOn(outside);
assert_false(popup.matches(':top-layer'),'popup should close');
assert_false(hint.matches(':top-layer'),'hint should close');
assert_true(async.matches(':top-layer'),'async does not light dismiss');
async.hidePopUp();
assert_false(async.matches(':top-layer'));
assert_true(manual.matches(':top-layer'),'manual does not light dismiss');
manual.hidePopUp();
assert_false(manual.matches(':top-layer'));
popup.showPopUp();
hint.showPopUp();
assert_true(popup.matches(':top-layer'));
Expand Down
30 changes: 15 additions & 15 deletions html/semantics/popups/popup-types.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@

<div id=popup popup>Popup</div>
<div id=hint popup=hint>Hint</div>
<div id=async popup=async>Async</div>
<div id=async2 popup=async>Async</div>
<div id=manual popup=manual>Async</div>
<div id=manual2 popup=manual>Async</div>

<script>
function assert_state_1(popupOpen,hintOpen,asyncOpen,async2Open) {
function assert_state_1(popupOpen,hintOpen,manualOpen,manual2Open) {
assert_equals(popup.matches(':top-layer'),popupOpen,'popup open state is incorrect');
assert_equals(hint.matches(':top-layer'),hintOpen,'hint open state is incorrect');
assert_equals(async.matches(':top-layer'),asyncOpen,'async open state is incorrect');
assert_equals(async2.matches(':top-layer'),async2Open,'async2 open state is incorrect');
assert_equals(manual.matches(':top-layer'),manualOpen,'manual open state is incorrect');
assert_equals(manual2.matches(':top-layer'),manual2Open,'manual2 open state is incorrect');
}
test(() => {
assert_state_1(false,false,false,false);
popup.showPopUp();
assert_state_1(true,false,false,false);
hint.showPopUp();
assert_state_1(true,true,false,false);
async.showPopUp();
manual.showPopUp();
assert_state_1(true,true,true,false);
async2.showPopUp();
manual2.showPopUp();
assert_state_1(true,true,true,true);
hint.hidePopUp();
assert_state_1(true,false,true,true);
Expand All @@ -36,26 +36,26 @@
assert_state_1(true,true,true,true);
popup.hidePopUp();
assert_state_1(false,false,true,true);
async.hidePopUp();
manual.hidePopUp();
assert_state_1(false,false,false,true);
async2.hidePopUp();
manual2.hidePopUp();
assert_state_1(false,false,false,false);
},'hints and asyncs do not close popups');
},'hints and manuals do not close popups');

test(() => {
assert_state_1(false,false,false,false);
hint.showPopUp();
async.showPopUp();
async2.showPopUp();
manual.showPopUp();
manual2.showPopUp();
assert_state_1(false,true,true,true);
popup.showPopUp();
assert_state_1(true,false,true,true);
popup.hidePopUp();
assert_state_1(false,false,true,true);
async.hidePopUp();
async2.hidePopUp();
manual.hidePopUp();
manual2.hidePopUp();
assert_state_1(false,false,false,false);
},'popups close hints but not asyncs');
},'popups close hints but not manuals');
</script>

<div id=popup1 popup>Popup 1
Expand Down