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

Unified Diff: LayoutTests/accessibility/scroll-to-make-visible-nested-2.html

Issue 661183002: Fix case where accessible scrollToMakeVisible didn't work. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectation Created 6 years, 2 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: LayoutTests/accessibility/scroll-to-make-visible-nested-2.html
diff --git a/LayoutTests/accessibility/scroll-to-make-visible-nested.html b/LayoutTests/accessibility/scroll-to-make-visible-nested-2.html
similarity index 54%
copy from LayoutTests/accessibility/scroll-to-make-visible-nested.html
copy to LayoutTests/accessibility/scroll-to-make-visible-nested-2.html
index 661bfccbca33c06c27e71a39aa59c2d3511dec7a..be9c96a593abfcb0a41b6ee978720ccb77987eab 100644
--- a/LayoutTests/accessibility/scroll-to-make-visible-nested.html
+++ b/LayoutTests/accessibility/scroll-to-make-visible-nested-2.html
@@ -6,24 +6,19 @@
<p id="description"></p>
-<div style="border: 1px solid #000; height: 5000px;">5000-pixel box</div>
-
-<div id="outer_container" style="height: 100px; overflow: scroll">
- <div style="border: 1px solid #000; height: 5000px;">5000-pixel box</div>
- <div id="inner_container" style="height: 100px; overflow: scroll">
- <div style="border: 1px solid #000; height: 5000px;">5000-pixel box</div>
- <button id="target">Target</button>
- </div>
+<div id="container" style="width: 100px; overflow: scroll">
+ <div style="border: 1px solid #000; width: 1000px; height: 5000px;">5000-pixel box</div>
+ <button id="target">Target</button>
+ <div style="border: 1px solid #000; width: 1000px; height: 5000px;">5000-pixel box</div>
</div>
<div id="console"></div>
<script>
-description("Tests that scrolling to make an element visible successfully scrolls multiple nested scrolling views'.");
+description("Tests that scrolling to make an element visible works when the inner scroll container doesn't need to be scrolled, but the other one does.");
function runTest() {
- window.outerContainer = document.getElementById("outer_container");
- window.innerContainer = document.getElementById("inner_container");
+ window.container = document.getElementById("container");
window.target = document.getElementById("target");
if (window.accessibilityController) {
@@ -33,12 +28,10 @@ function runTest() {
// Reset the initial scroll positions (since calling focus() can scroll the page too).
window.scrollTo(0, 0);
- outerContainer.scrollTop = 0;
- innerContainer.scrollTop = 0;
+ container.scrollTop = 0;
shouldBe("window.pageYOffset", "0");
- shouldBe("outerContainer.scrollTop", "0");
- shouldBe("innerContainer.scrollTop", "0");
- shouldBeGreaterThanOrEqual("target.getBoundingClientRect().top", "15000");
+ shouldBe("container.scrollTop", "0");
+ shouldBeGreaterThanOrEqual("target.getBoundingClientRect().top", "5000");
// Scroll to make target visible.
if (window.accessibilityController)

Powered by Google App Engine
This is Rietveld 408576698