Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: LayoutTests/editing/input/reveal-selection-having-stored-scroll-position.html

Issue 914573004: Discard scrolling to the saved scroll points if there is any selection done by user. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: adding layout test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698