Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html b/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2ee462791fc0a260051a69c358eb352fe5e5da4b |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<div style="overflow-x:hidden"> |
|
bokan
2016/09/14 21:43:15
Is this div needed?
sunyunjia
2016/09/14 23:58:39
Yes. This div hasOverflowClip(), making it goto
if
bokan
2016/09/15 13:15:21
Got it, thanks.
|
| + <div id="click" ><a href="#anchor">Click me should jump to the anchor</a></div> |
| + <div style="height: 2000px"></div> |
| + <a id="anchor"></a> |
| + <p>Text</p> |
| + <div style="height: 2000px"></div> |
| +</div> |
| +<script> |
| +test(function() { |
| + if (!window.eventSender) |
| + return; |
| + var click = document.getElementById("click"); |
| + var x = click.offsetLeft + 5; |
| + var y = click.offsetTop + 5; |
| + eventSender.mouseMoveTo(x, y); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| + assert_not_equals(window.scrollY, 0); |
| +}, "Tests that when the anchor's layoutbox is empty, we can still jump to it by hashtag"); |
| +</script> |