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

Unified Diff: third_party/WebKit/LayoutTests/intersection-observer/remove-element.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/remove-element.html
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html b/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html
index dcb3ff89a066842590a53bf713431bd9f99af991..f60aa232d8924f72e9dba7e78b02f9bdaadc292b 100644
--- a/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html
+++ b/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html
@@ -57,29 +57,29 @@ runTestCycle(function() {
function step0() {
root.scrollTop = 150;
runTestCycle(step1, "root.scrollTop = 150");
- assert_equals(entries.length, 0, "No notifications after first rAF.");
+ checkLastEntry(entries, 0, [11, 111, 311, 411, 0, 0, 0, 0, 11, 111, 11, 211, target]);
}
function step1() {
root.removeChild(target);
runTestCycle(step2, "root.removeChild(target).");
- checkLastEntry(entries, 0, [11, 111, 161, 261, 11, 111, 161, 211, 11, 111, 11, 211, target]);
+ checkLastEntry(entries, 1, [11, 111, 161, 261, 11, 111, 161, 211, 11, 111, 11, 211, target]);
}
function step2() {
root.scrollTop = 0;
root.insertBefore(target, trailingSpace);
runTestCycle(step3, "root.insertBefore(target, trailingSpace).");
- checkLastEntry(entries, 1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, target]);
+ checkLastEntry(entries, 2, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, target]);
}
function step3() {
root.scrollTop = 150;
runTestCycle(step4, "root.scrollTop = 150 after reinserting target.");
- checkLastEntry(entries, 1);
+ checkLastEntry(entries, 2);
}
function step4() {
- checkLastEntry(entries, 2, [11, 111, 161, 261, 11, 111, 161, 211, 11, 111, 11, 211, target]);
+ checkLastEntry(entries, 3, [11, 111, 161, 261, 11, 111, 161, 211, 11, 111, 11, 211, target]);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698