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

Unified Diff: third_party/WebKit/LayoutTests/intersection-observer/root-margin.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/root-margin.html
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html b/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html
index 0c2bc9ffeb1c6bb9c5f86aabda4a30929ccbc783..6ccd8026e05a8c400f9b861a45831ce14bf049ed 100644
--- a/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html
+++ b/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html
@@ -54,24 +54,24 @@ runTestCycle(function() {
function step0() {
document.scrollingElement.scrollLeft = 100;
runTestCycle(step1, "document.scrollingElement.scrollLeft = 100");
- assert_equals(entries.length, 0, "No notifications after first rAF.");
+ checkLastEntry(entries, 0, [1012, 1112, 708, 808, 0, 0, 0, 0, -30, 942, -10, 819, target]);
}
function step1() {
document.scrollingElement.scrollTop = 800;
runTestCycle(step2, "document.scrollingElement.scrollTop = 800");
- checkLastEntry(entries, 0, [912, 1012, 708, 808, 912, 942, 708, 808, -30, 942, -10, 819, target]);
+ checkLastEntry(entries, 1, [912, 1012, 708, 808, 912, 942, 708, 808, -30, 942, -10, 819, target]);
}
function step2() {
document.scrollingElement.scrollTop = 900;
runTestCycle(step3, "document.scrollingElement.scrollTop = 900");
- checkLastEntry(entries, 0);
+ checkLastEntry(entries, 1);
}
function step3() {
document.scrollingElement.scrollLeft = 0;
document.scrollingElement.scrollTop = 0;
- checkLastEntry(entries, 1, [912, 1012, -192, -92, 0, 0, 0, 0, -30, 942, -10, 819, target]);
+ checkLastEntry(entries, 2, [912, 1012, -192, -92, 0, 0, 0, 0, -30, 942, -10, 819, target]);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698