Skip to content

Commit

Permalink
Bug 1776291 [wpt PR 34567] - Rename popup=async to popup=manual, a=te…
Browse files Browse the repository at this point in the history
…stonly

Automatic update from web-platform-tests
Rename popup=async to popup=manual

Per the [1] resolution, we have decided to rename popup=async to
popup=manual, since it is a) parallel to popup=auto, and b) easier
to understand.

[1] openui/open-ui#495 (comment)

Bug: 1307772
Change-Id: I786f6332c2a7f9df4810aeedfd425e38579ea1b1
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3722345
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1017762}

--

wpt-commits: 7b93c5f15d2d4df418f7dc1e61c3f82e24935833
wpt-pr: 34567
  • Loading branch information
mfreed7 authored and moz-wptsync-bot committed Jun 29, 2022
1 parent a9d9a79 commit c2376f7
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
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
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
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
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

0 comments on commit c2376f7

Please sign in to comment.