Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Resync intersection-observer WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227500 Reviewed by Sam Weinig. Resync intersection-observer WPT tests from upstream a38612f39e7752c353208. * web-platform-tests/intersection-observer/target-is-root-expected.txt: Added. * web-platform-tests/intersection-observer/target-is-root.html: Added. * web-platform-tests/intersection-observer/w3c-import.log: Canonical link: https://commits.webkit.org/239249@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
PASS IntersectionObserver when root == target doesn't compute an intersection | ||
|
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,35 @@ | ||
<!DOCTYPE html> | ||
<title>IntersectionObserver when root == target doesn't compute an intersection</title> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1682915"> | ||
<link rel="help" href="https://w3c.github.io/IntersectionObserver/#update-intersection-observations-algo"> | ||
<!-- | ||
Quoting IntersectionObserver section 3.2.8, "Run the Update Intersection Observations Steps", step 2, substep 3: | ||
If the intersection root is an Element, and target is not a descendant of | ||
the intersection root in the containing block chain, skip to step 11. | ||
--> | ||
<style> | ||
#container { | ||
overflow: scroll; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
<div id=container> | ||
<div></div> | ||
</div> | ||
<script> | ||
async_test(function(t) { | ||
let container = document.getElementById("container"); | ||
let observer = new IntersectionObserver(t.step_func_done(function(entries) { | ||
assert_equals(entries.length, 1); | ||
assert_equals(entries[0].intersectionRatio, 0); | ||
assert_equals(entries[0].isIntersecting, false); | ||
}), { root: container }); | ||
observer.observe(container); | ||
}); | ||
</script> |
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