Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html

Issue 2645283008: IntersectionObserver: Always send an initial notification. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html b/third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html
index 6d5ced2a2ab03dc7c0a6ad12459be492f8be0cfe..47d993326ba18025546a1f93b5c966c841e6f237 100644
--- a/third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html
+++ b/third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html
@@ -40,30 +40,30 @@ runTestCycle(function() {
observer.observe(target);
entries = entries.concat(observer.takeRecords());
assert_equals(entries.length, 0, "No initial notifications.");
- runTestCycle(step0, "No notifications after first rAF.");
+ runTestCycle(step0, "First rAF.");
}, "IntersectionObserver should detect and report edge-adjacent and zero-area intersections.");
function step0() {
runTestCycle(step1, "Set transform=translateY(200px) on target.");
- assert_equals(entries.length, 0, "entries.length");
+ checkLastEntry(entries, 0, [8, 108, 258, 358, 0, 0, 0, 0, 8, 208, 8, 208, target]);
target.style.transform = "translateY(200px)";
}
function step1() {
runTestCycle(step2, "Set transform=translateY(201px) on target.");
- checkLastEntry(entries, 0, [8, 108, 208, 308, 8, 108, 208, 208, 8, 208, 8, 208, target]);
+ checkLastEntry(entries, 1, [8, 108, 208, 308, 8, 108, 208, 208, 8, 208, 8, 208, target]);
target.style.transform = "translateY(201px)";
}
function step2() {
runTestCycle(step3, "Set transform=translateY(185px) on target.");
- checkLastEntry(entries, 1);
+ checkLastEntry(entries, 2);
target.style.height = "0px";
target.style.width = "300px";
target.style.transform = "translateY(185px)";
}
function step3() {
- checkLastEntry(entries, 2, [8, 308, 193, 193, 8, 208, 193, 193, 8, 208, 8, 208, target]);
+ checkLastEntry(entries, 3, [8, 308, 193, 193, 8, 208, 193, 193, 8, 208, 8, 208, target]);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698