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

Unified Diff: third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html

Issue 2645283008: IntersectionObserver: Always send an initial notification. (Closed)
Patch Set: Fix unit test 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/unclipped-root.html
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html b/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
index 40d39ca4bd9250591c250b87ae2bd3a05633dd5a..490b9eb30e404b1ccac3520cc0512a1bb4b0c2ab 100644
--- a/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
+++ b/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
@@ -41,17 +41,17 @@ runTestCycle(function() {
observer.observe(target);
entries = entries.concat(observer.takeRecords());
assert_equals(entries.length, 0, "No initial notifications.");
- runTestCycle(step0, "First rAF should not generate notifications.");
+ runTestCycle(step0, "First rAF.");
}, "Test that border bounding box is used to calculate intersection with a non-scrolling root.");
function step0() {
target.style.transform = "translateY(195px)";
runTestCycle(step1, "target.style.transform = 'translateY(195px)'");
- assert_equals(entries.length, 0, "No notifications after first rAF.");
+ checkLastEntry(entries, 0, [15, 115, 315, 415, 0, 0, 0, 0, 8, 182, 8, 222, target]);
}
function step1() {
target.style.transform = "";
- checkLastEntry(entries, 0, [15, 115, 210, 310, 15, 115, 210, 222, 8, 182, 8, 222, target]);
+ checkLastEntry(entries, 1, [15, 115, 210, 310, 15, 115, 210, 222, 8, 182, 8, 222, target]);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698