Skip to content

Commit

Permalink
Bug 1862771 [wpt PR 42929] - checkVisibility: Add extra parameters as…
Browse files Browse the repository at this point in the history
… aliases and c-v auto, a=testonly

Automatic update from web-platform-tests
checkVisibility: Add extra parameters as aliases and c-v auto

This is to implement
w3c/csswg-drafts#9549

[email protected]

Change-Id: Id5d8c700019a257d8dc3fc79436eefc427e8aac3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003245
Auto-Submit: Vladimir Levin <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1219676}

--

wpt-commits: 07417e7c2e42620f8f06cde13d51a928c978b0d3
wpt-pr: 42929
  • Loading branch information
vmpstr authored and moz-wptsync-bot committed Nov 19, 2023
1 parent 72a870a commit 94d6c25
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions testing/web-platform/tests/css/cssom-view/checkVisibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
assert_false(visibilityhidden.checkVisibility({
checkVisibilityCSS: true
}), 'checkVisibilityCSS:true');
assert_false(visibilityhidden.checkVisibility({
visibilityProperty: true
}), 'visibilityProperty:true');
assert_true(visibilityhidden.checkVisibility({
checkVisibilityCSS: false
}), 'checkVisibilityCSS:false');
Expand All @@ -84,20 +87,20 @@
promise_test(async () => {
await new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
assert_true(cvauto.checkVisibility({
checkContentVisibilityAuto: false
}), 'checkContentVisibilityAuto: false');
contentVisibilityAuto: false
}), 'contentVisibilityAuto: false');
assert_true(cvauto.checkVisibility({
checkContentVisibilityAuto: true
}), 'checkContentVisibilityAuto: true');
contentVisibilityAuto: true
}), 'contentVisibilityAuto: true');
}, 'checkVisibility on content-visibility:auto element.');

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

test(() => {
Expand All @@ -117,6 +120,9 @@
assert_false(opacityzero.checkVisibility({
checkOpacity: true
}), 'checkOpacity:true');
assert_false(opacityzero.checkVisibility({
opacityProperty: true
}), 'opacityProperty:true');
assert_true(opacityzero.checkVisibility({
checkOpacity: false
}), 'checkOpacity:false');
Expand All @@ -135,11 +141,11 @@
cvautocontainer.style.contentVisibility = 'auto';
cvautochild.style.visibility = 'hidden';
assert_false(cvautochild.checkVisibility({checkVisibilityCSS: true}));
assert_false(cvautochild.checkVisibility({checkContentVisibilityAuto: true}));
assert_false(cvautochild.checkVisibility({contentVisibilityAuto: true}));
assert_true(cvautochild.checkVisibility());
cvautochild.style.visibility = 'visible';
assert_true(cvautochild.checkVisibility({checkVisibilityCSS: true}));
assert_false(cvautochild.checkVisibility({checkContentVisibilityAuto: true}));
assert_false(cvautochild.checkVisibility({contentVisibilityAuto: true}));
assert_true(cvautochild.checkVisibility());
}, 'checkVisibility on content-visibility:auto with visibility:hidden inside.');

Expand Down

0 comments on commit 94d6c25

Please sign in to comment.