Chromium Code Reviews| Index: LayoutTests/editing/input/reveal-selection-having-stored-scroll-position.html |
| diff --git a/LayoutTests/fast/loader/scroll-position-restored-on-back.html b/LayoutTests/editing/input/reveal-selection-having-stored-scroll-position.html |
| similarity index 56% |
| copy from LayoutTests/fast/loader/scroll-position-restored-on-back.html |
| copy to LayoutTests/editing/input/reveal-selection-having-stored-scroll-position.html |
| index a92d67ef073c851bb9d9bbedbd38f6eafc272ff6..2cee5c65f2b1044c92b7df5b03cd0a57642b425b 100644 |
| --- a/LayoutTests/fast/loader/scroll-position-restored-on-back.html |
| +++ b/LayoutTests/editing/input/reveal-selection-having-stored-scroll-position.html |
| @@ -14,13 +14,18 @@ function navigate() |
| history.pushState({ }, "", window.location + "#1"); |
| setTimeout("window.location.href = 'resources/empty-document-goes-back.html'", 0); |
| return; |
| + } else { |
|
yoichio
2015/03/11 04:16:52
Above if statement ends with return so we don't ne
pals
2015/03/11 06:09:28
Done.
|
| + var input = document.getElementById("text-input"); |
| + input.focus(); |
| + if (window.eventSender) |
| + eventSender.keyDown("a"); |
| } |
| setTimeout(function () { |
| var scrollPosition = document.body.scrollTop; |
| var result = document.getElementById("result"); |
| - if (scrollPosition == 100) |
| - result.innerHTML = "Success! The scroll position was restored after navigation." |
| + if (scrollPosition != 100) |
| + result.innerHTML = "Success! The scroll position in history was not restored after navigation as input field is revealed on selection." |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| @@ -29,7 +34,8 @@ function navigate() |
| </script> |
| </head> |
| <body style="width:800px" onpageshow="navigate();"> |
| - <div id="result">Fail. The scroll position was not restored after navigation.</div><br/><br/> |
| - <div style="width:600; height:1000; background-color:purple;"></div> |
| + <input id="text-input" type="text"/> |
| + <div id="result">Fail. The scroll position in history was restored after navigation.</div><br/><br/> |
| + <div style="width:600; height:1200; background-color:purple;"></div> |
| </body> |
| </htmL> |