7 if (location
.hash
== "") {
8 if (window
.testRunner
) {
9 testRunner
.dumpAsText();
10 testRunner
.waitUntilDone();
14 history
.pushState({ }, "", window
.location
+ "#1");
15 setTimeout("window.location.href = 'resources/empty-document-goes-back.html'", 0);
18 var input
= document
.getElementById("text-input");
20 if (window
.eventSender
)
21 eventSender
.keyDown("a");
23 setTimeout(function () {
24 var scrollPosition
= document
.scrollingElement
.scrollTop
;
25 var result
= document
.getElementById("result");
26 if (scrollPosition
!= 100)
27 result
.innerHTML
= "Success! The scroll position in history was not restored after navigation as input field is revealed on selection."
28 if (window
.testRunner
)
29 testRunner
.notifyDone();
35 <body style=
"width:800px" onpageshow=
"navigate();">
36 <input id=
"text-input" type=
"text"/>
37 <div id=
"result">Fail. The scroll position in history was restored after navigation.
</div><br/><br/>
38 <div style=
"width:600; height:1200; background-color:purple;"></div>