-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@bb8d1fadbed47ecacd7193cbad1687ee81bf951d
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
Showing
5 changed files
with
166 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
third_party/blink/web_tests/external/wpt/intersection-observer/padding-clip-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
45 changes: 45 additions & 0 deletions
45
third_party/blink/web_tests/external/wpt/intersection-observer/padding-clip.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |