Skip to content

Commit

Permalink
Import wpt@bb8d1fadbed47ecacd7193cbad1687ee81bf951d
Browse files Browse the repository at this point in the history
Using wpt-import in Chromium 139a4e7.

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
eae@chromium.org, szager@chromium.org:
  external/wpt/intersection-observer

NOAUTOREVERT=true
R=rubber-stamper@appspot.gserviceaccount.com

No-Export: true
Validate-Test-Flakiness: skip
Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel,linux-blink-rel
Change-Id: I98a41c020c4bdc3177e5b135a980d94b2ee51f06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4950108
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1212007}
  • Loading branch information
Chromium WPT Sync authored and Chromium LUCI CQ committed Oct 19, 2023
1 parent 9bda712 commit 78237dd
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 4 deletions.
2 changes: 1 addition & 1 deletion third_party/blink/web_tests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -6696,7 +6696,7 @@ crbug.com/1454689 http/tests/inspector-protocol/tracing/cpu-profiling.js [ Failu

crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/abort-multiple-gets-through-first-idp.https.html [ Pass Timeout ]
crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/abort-multiple-gets-through-second-idp.https.html [ Pass Timeout ]
crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/get-before-and-after-onload.https.html [ Pass Failure Timeout ]
crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/get-before-and-after-onload.https.html [ Failure Pass Timeout ]
crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/get-before-and-during-onload.https.html [ Pass Timeout ]
crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/get-before-onload-and-during-dom-content-loaded.https.html [ Pass Timeout ]
crbug.com/1455245 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html [ Pass Timeout ]
Expand Down
83 changes: 80 additions & 3 deletions third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
Original file line number Diff line number Diff line change
Expand Up @@ -19911,6 +19911,19 @@
{}
]
],
"page-margin-005-print.html": [
"8ca80bc69724ee8f8b1801af2b08d4ac923466a1",
[
null,
[
[
"/css/printing/page-margin-005-print-ref.html",
"=="
]
],
{}
]
],
"page-name-001-print.html": [
"56281bb4ed5f8b3e34401420b10504ed6c0e00fd",
[
Expand Down Expand Up @@ -155395,6 +155408,19 @@
{}
]
],
"mask-clip-8.html": [
"924920ffacafcfdf3cb71732389ccb768ba60d94",
[
null,
[
[
"/css/css-masking/mask-image/mask-clip-8-ref.html",
"=="
]
],
{}
]
],
"mask-composite-1a.html": [
"795e52b8ae8df95243997c7d327b114522f8ff1f",
[
Expand Down Expand Up @@ -284452,11 +284478,11 @@
"support": {
".cache": {
"gitignore2.json": [
"0839a9635eaa31f25d0012770ec7250c464b0319",
"23fe421c963d9b934729bbbd0fb131f6568df20c",
[]
],
"mtime.json": [
"bfe41c980abe016005e85d47d1eda3d3ddf1c72c",
"1ec942df7fea5b4b5955b8d12b727a52a0b1d558",
[]
]
},
Expand Down Expand Up @@ -324885,6 +324911,10 @@
"f67f74bc8bfcdd7b68dc0d0c32bffbbb00f0dc53",
[]
],
"mask-clip-8-ref.html": [
"d7276bd66449f181b368a16866d216b8fbe44bf8",
[]
],
"mask-composite-1-ref.html": [
"9249622cc4652b22e8dd205b05fde95b046ef11f",
[]
Expand Down Expand Up @@ -351406,6 +351436,10 @@
"24549d4954228c1e48e230fcf4981eeadd4b5d9c",
[]
],
"page-margin-005-print-ref.html": [
"bd1829be383a7cbd7c6b134fc6efb6517520731f",
[]
],
"page-name-001-print-ref.html": [
"69c5c37b5a3cc4ed47fab1f8105e5f2351e2d07b",
[]
Expand Down Expand Up @@ -388975,6 +389009,10 @@
"e918bf1a4f0313a94cfb8b269658bb7e42cc8745",
[]
],
"padding-clip-expected.txt": [
"698cd8bc7452b205f96b6b7b7e090de559089c52",
[]
],
"resources": {
"cross-origin-child-iframe.sub.html": [
"c341cd410227139176d3457aa6b953fc1b8a8a96",
Expand Down Expand Up @@ -475988,6 +476026,13 @@
{}
]
],
"position-absolute-margin-auto-001.html": [
"9ec1c3f0116ed14adb75afb11dc776230f66c3b5",
[
null,
{}
]
],
"position-absolute-padding-percentage.html": [
"2d43639f1987fbf325a538dedb215bc029deeda8",
[
Expand Down Expand Up @@ -492054,7 +492099,7 @@
]
],
"checkVisibility.html": [
"20fb767bc91330a56a71a1f9b205260f9c493219",
"c0146dc14e152cb7165609867c677a182419a677",
[
null,
{}
Expand Down Expand Up @@ -599510,6 +599555,13 @@
{}
]
],
"padding-clip.html": [
"0126304d640f9007f87fb9305f7a535da71696ee",
[
null,
{}
]
],
"remove-element.html": [
"a093b22028c11c3e54db4a6f8fcccaad6a309bfb",
[
Expand Down Expand Up @@ -671568,6 +671620,31 @@
}
]
],
"video-encoder-content-hint.https.any.js": [
"cdc32fe3c64ed7afa09d7ca97b59ac2ad18ffdb3",
[
"webcodecs/video-encoder-content-hint.https.any.html",
{
"script_metadata": [
[
"global",
"window,dedicatedworker"
]
]
}
],
[
"webcodecs/video-encoder-content-hint.https.any.worker.html",
{
"script_metadata": [
[
"global",
"window,dedicatedworker"
]
]
}
]
],
"video-encoder-flush.https.any.js": [
"8f1724bc8571df44127cbb32a80915ded9b74687",
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,30 @@

<div id=displaynone style="display:none">hello</div>

<div style="display:none" class="shadow-host-with-slot">
<div id="slottedindisplaynone" slot="slot">slotted</div>
</div>

<div id=displaycontents style="display:contents">
<div id=displaycontentschild>hello</div>
</div>

<div id=opacityzero style="opacity:0">hello</div>

<div style="opacity:0" class="shadow-host-with-slot">
<div id="slottedinopacityzero" slot="slot">slotted</div>
</div>

<div style="content-visibility:hidden">
<div id=cvhiddenchildwithupdate></div>
</div>

<div style="content-visibility:hidden" id=cvhiddenwithupdate></div>

<div style="content-visibility:hidden" class="shadow-host-with-slot">
<div id="slottedincvhidden" slot="slot">slotted</div>
</div>

<div style="height:10000px">spacer</div>

<div style="content-visibility:auto">
Expand All @@ -45,6 +57,13 @@
</div>

<script>
for (const host of document.querySelectorAll(".shadow-host-with-slot")) {
const shadowRoot = host.attachShadow({ mode: "open" });
const slot = document.createElement("slot");
slot.name = "slot";
shadowRoot.appendChild(slot);
}

test(() => {
assert_false(visibilityhidden.checkVisibility({
checkVisibilityCSS: true
Expand All @@ -58,6 +77,10 @@
assert_false(cvhidden.checkVisibility());
}, 'checkVisibility on content-visibility:hidden element.');

test(() => {
assert_false(slottedincvhidden.checkVisibility());
}, 'checkVisibility on element slotted in content-visibility: hidden shadow host.');

test(() => {
assert_true(cvauto.checkVisibility());
}, 'checkVisibility on content-visibility:auto element.');
Expand All @@ -70,6 +93,10 @@
assert_false(displaynone.checkVisibility());
}, 'checkVisibility on display:none element.');

test(() => {
assert_false(slottedindisplaynone.checkVisibility());
}, 'checkVisibility on element slotted in display:none shadow host.');

test(() => {
assert_false(displaycontents.checkVisibility());
assert_true(displaycontentschild.checkVisibility());
Expand All @@ -84,6 +111,15 @@
}), 'checkOpacity:false');
}, 'checkVisibility on opacity:0 element.');

test(() => {
assert_false(slottedinopacityzero.checkVisibility({
checkOpacity: true
}), 'checkOpacity: true');
assert_true(slottedinopacityzero.checkVisibility({
checkOpacity: false
}), 'checkOpacity: true');
}, 'checkVisibility on element slotted in opacity: 0; shadow host.');

test(() => {
cvautocontainer.style.contentVisibility = 'auto';
cvautochild.style.visibility = 'hidden';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is a testharness.js-based test.
FAIL Scrollport is used rather than content rect to compute intersection ratio assert_equals: Should be completely visible. expected 1 but got 0.6399999856948853
Harness: the test ran to completion.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Scrollport is used rather than content rect to compute intersection ratio</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="help" href="https://github.com/w3c/IntersectionObserver/issues/504">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#root {
overflow: hidden;
position: relative;
box-sizing: border-box;
width: 100px;
height: 100px;
padding: 10px;
}
#target {
width: 100px;
height: 100px;
background-color: green;
/* Shift into the padding area */
position: relative;
left: -10px;
top: -10px;
}
</style>
<div id="root">
<div id="target"></div>
</div>
<script>
promise_test(async function(t) {
const target = document.getElementById("target");
assert_true(!!target, "target exists");
const root = document.getElementById("root");
assert_true(!!root, "root exists");
const entries = await new Promise(resolve => {
const observer = new IntersectionObserver(resolve, { root });
observer.observe(target);
});
assert_equals(entries.length, 1, "Should have one entry.");
assert_equals(entries[0].intersectionRatio, 1, "Should be completely visible.");
});
</script>

0 comments on commit 78237dd

Please sign in to comment.