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

Unified Diff: LayoutTests/accessibility/scroll-to-make-visible-div-overflow.html

Issue 1118753004: Fix another case where scrollToMakeVisible was off. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: null-check scrollParent Created 5 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/scroll-to-make-visible-div-overflow.html
diff --git a/LayoutTests/accessibility/scroll-to-make-visible-div-overflow.html b/LayoutTests/accessibility/scroll-to-make-visible-div-overflow.html
index 5f409e7d62a75a34a64637042ef8cceedf04937f..5d1c91a84472b7c4fecb443140ea1a62917baad7 100644
--- a/LayoutTests/accessibility/scroll-to-make-visible-div-overflow.html
+++ b/LayoutTests/accessibility/scroll-to-make-visible-div-overflow.html
@@ -42,6 +42,15 @@ function runTest() {
shouldBe("container.scrollTop >= minYOffset", "true");
shouldBe("container.scrollTop <= maxYOffset", "true");
+ // Do it again. It shouldn't scroll.
+ if (window.accessibilityController)
+ lowerTargetAccessibleObject.scrollToMakeVisible();
+ var top = lowerTarget.offsetTop - container.offsetTop;
+ window.minYOffset = top + lowerTarget.offsetHeight - container.offsetHeight;
+ window.maxYOffset = top;
+ shouldBe("container.scrollTop >= minYOffset", "true");
+ shouldBe("container.scrollTop <= maxYOffset", "true");
+
// Scroll to make upper target visible and check.
if (window.accessibilityController)
upperTargetAccessibleObject.scrollToMakeVisible();
« no previous file with comments | « no previous file | LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698