Index: third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-vertical-rl-anchors.html |
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-anchors.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-vertical-rl-anchors.html |
similarity index 71% |
copy from third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-anchors.html |
copy to third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-vertical-rl-anchors.html |
index c69822f5e35b8f887d14303ee8165bdcf77926c8..5c8d642f3355a35f326267ae4cb6d72385500d72 100644 |
--- a/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-anchors.html |
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-vertical-rl-anchors.html |
@@ -1,6 +1,9 @@ |
<script src="../../../resources/testharness.js"></script> |
<script src="../../../resources/testharnessreport.js"></script> |
<style> |
+ html { |
+ -webkit-writing-mode: vertical-rl; |
+ } |
body { |
margin: 0px; |
height: 2000px; |
@@ -8,10 +11,10 @@ |
} |
#changer { |
background-color: #FF7F7F; |
- height: 10px; |
+ width: 0px; |
} |
#anchor { |
- height: 1500px; |
+ width: 1500px; |
background-color: #84BE6A; |
} |
</style> |
@@ -20,22 +23,18 @@ |
<div id="anchor"></div> |
<script> |
- var asyncTest = async_test("Verify smooth scroll interaction with scroll anchroing"); |
+ var asyncTest = async_test("Verify smooth scroll interaction with scroll anchroing on page with vertical-lr writing mode"); |
// The element that will change in height. |
var ch; |
- |
- // Initital scroll position. |
- var initialX = 0; |
- var initialY = 10; |
// Amount to smooth scroll by. |
- var userScrollX = 51; |
- var userScrollY = 205; |
+ var userScrollX = -205; |
+ var userScrollY = 51; |
// Amount to change the height of the element above the viewport. |
- var changerY = 100; |
+ var changerX = 100; |
// End position: height of ch + userScroll. |
- var endX = 51; |
- var endY = 305; |
+ var endX = -305; |
+ var endY = 51; |
function scrollListener() { |
if (window.scrollX == endX && window.scrollY == endY) { |
@@ -43,8 +42,8 @@ |
return; |
} |
- if (ch.style.height != "100") |
- ch.style.height = changerY; |
+ if (ch.style.width != "100") |
+ ch.style.width = changerX; |
} |
window.onload = function() { |
@@ -54,17 +53,11 @@ |
internals.settings.setScrollAnimatorEnabled(true); |
ch = document.getElementById("changer"); |
- document.getElementById('anchor').scrollIntoView(); |
// Smooth scroll. |
eventSender.mouseMoveTo(100, 100); |
eventSender.continuousMouseScrollBy(-userScrollX, -userScrollY); |
- asyncTest.step(function() { |
- assert_equals(window.scrollX, initialX); |
- assert_equals(window.scrollY, initialY); |
- }); |
- |
document.addEventListener("scroll", scrollListener); |
} |
</script> |