blob: 3e1038a4d34e164480baa1e696613ebd774fa7a3 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/gesture-util.js"></script>
<div style="overflow-x:hidden">
<div id="click" ><a href="#anchor">Click me should jump to the anchor</a></div>
<div style="height: 2000px"></div>
<a id="anchor"></a>
<div style="height: 2000px"></div>
promise_test(async () => {
var click = document.getElementById("click");
var x = click.offsetLeft + 5;
var y = click.offsetTop + 5;
await mouseMoveTo(x, y);
await mouseDownAt(x, y);
await mouseUpAt(x, y);
waitFor(() => { return window.scrollY > 0; });
}, "Tests that when the anchor's layoutbox is empty, we can still jump to it by hashtag");