Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scrolling / scroll-clears-fragment-anchor.html
blob6be0daf6cbf8505373d6736a28f6162063832c59
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
5 body {
6 height: 1000px;
8 #a1 {
9 display: block;
10 position: absolute;
11 width: 1px;
12 height: 1px;
13 left: 0;
14 top: 0;
17 </style>
18 <a id="a1" name="a1"></a>
19 <script>
21 description("Tests that after an explicit scroll, we do not continue to " +
22 "maintain scroll position at the anchor identified by the hash fragment.");
24 location.hash = "a1";
26 // This scroll should reset FrameView::m_scrollAnchor.
27 scrollTo(0, 10);
29 // Force a layout.
30 document.querySelector("#a1").style.width = "2px";
32 shouldBe(String(scrollY), "10");
33 location.hash = "";
35 </script>