Skip to content

Commit

Permalink
Bug 1777319 [wpt PR 34648] - Rename isVisible to checkVisibility, a=t…
Browse files Browse the repository at this point in the history
…estonly

Automatic update from web-platform-tests
Rename isVisible to checkVisibility

This was resolved by the csswg here:
w3c/csswg-drafts#7317 (comment)

Bug: 1309533
Change-Id: I70999d507e571d5e0d894e59f79f37271aecc8b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3735856
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1019702}

--

wpt-commits: 295610168a97e68fc372731a6799777063235d59
wpt-pr: 34648
  • Loading branch information
josepharhar authored and moz-wptsync-bot committed Jul 5, 2022
1 parent e901c8f commit a05e5c7
Showing 1 changed file with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,67 +44,67 @@

<script>
test(() => {
assert_false(visibilityhidden.isVisible({
assert_false(visibilityhidden.checkVisibility({
checkVisibilityCSS: true
}), 'checkVisibilityCSS:true');
assert_true(visibilityhidden.isVisible({
assert_true(visibilityhidden.checkVisibility({
checkVisibilityCSS: false
}), 'checkVisibilityCSS:false');
}, 'isVisible on visibility:hidden element.');
}, 'checkVisibility on visibility:hidden element.');

test(() => {
assert_false(cvhidden.isVisible());
}, 'isVisible on content-visibility:hidden element.');
assert_false(cvhidden.checkVisibility());
}, 'checkVisibility on content-visibility:hidden element.');

test(() => {
assert_true(cvauto.isVisible());
}, 'isVisible on content-visibility:auto element.');
assert_true(cvauto.checkVisibility());
}, 'checkVisibility on content-visibility:auto element.');

test(() => {
assert_true(cvautooffscreen.isVisible());
}, 'isVisible on content-visibility:auto element which is outside the viewport.');
assert_true(cvautooffscreen.checkVisibility());
}, 'checkVisibility on content-visibility:auto element which is outside the viewport.');

test(() => {
assert_false(displaynone.isVisible());
}, 'isVisible on display:none element.');
assert_false(displaynone.checkVisibility());
}, 'checkVisibility on display:none element.');

test(() => {
assert_false(opacityzero.isVisible({
assert_false(opacityzero.checkVisibility({
checkOpacity: true
}), 'checkOpacity:true');
assert_true(opacityzero.isVisible({
assert_true(opacityzero.checkVisibility({
checkOpacity: false
}), 'checkOpacity:false');
}, 'isVisible on opacity:0 element.');
}, 'checkVisibility on opacity:0 element.');

test(() => {
assert_false(inert.isVisible({
assert_false(inert.checkVisibility({
checkInert: true
}), 'checkInert:true');
assert_true(inert.isVisible({
assert_true(inert.checkVisibility({
checkInert: false
}), 'checkInert:false');
}, 'isVisible on an inert element.');
}, 'checkVisibility on an inert element.');

test(() => {
cvautocontainer.style.contentVisibility = 'auto';
cvautochild.style.visibility = 'hidden';
assert_false(cvautochild.isVisible({checkVisibilityCSS: true}));
assert_false(cvautochild.checkVisibility({checkVisibilityCSS: true}));
cvautochild.style.visibility = 'visible';
assert_true(cvautochild.isVisible({checkVisibilityCSS: true}));
}, 'isVisible on content-visibility:auto with visibility:hidden inside.');
assert_true(cvautochild.checkVisibility({checkVisibilityCSS: true}));
}, 'checkVisibility on content-visibility:auto with visibility:hidden inside.');

test(() => {
assert_true(nestedcvautochild.isVisible());
}, 'isVisible on nested content-visibility:auto containers reports that the content is visible.');
assert_true(nestedcvautochild.checkVisibility());
}, 'checkVisibility on nested content-visibility:auto containers reports that the content is visible.');

test(() => {
cvhiddenchildwithupdate.getBoundingClientRect();
assert_false(cvhiddenchildwithupdate.isVisible());
}, 'isVisible on content-visibility:hidden child after forced layout update.');
assert_false(cvhiddenchildwithupdate.checkVisibility());
}, 'checkVisibility on content-visibility:hidden child after forced layout update.');

test(() => {
cvhiddenwithupdate.getBoundingClientRect();
assert_true(cvhiddenwithupdate.isVisible());
}, 'isVisible on content-visibility:hidden element after forced layout update.');
assert_true(cvhiddenwithupdate.checkVisibility());
}, 'checkVisibility on content-visibility:hidden element after forced layout update.');
</script>

0 comments on commit a05e5c7

Please sign in to comment.