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) |