blob: 10f78865449d5f80f6f8b9ba195351531b60cee6 [file] [log] [blame]
<style>
#puffin {
font: Ahem 10px;
position: absolute;
top: 0;
left: 0;
overflow: scroll;
width: 100px;
height: 100px;
background-color: #ccc;
}
</style>
<div id="puffin">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<pre id="tree"></pre>
<script>
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
var testDiv = document.getElementById("puffin");
testDiv.addEventListener("scroll", function(event) {
location.href = 'data:text/html,<script>alert("Going back.");history.back();</' + 'script>';
});
window.addEventListener("pageshow", function(event) {
if (event.persisted) {
document.getElementById("tree").innerText = window.internals.elementRenderTreeAsText(document.getElementById("puffin"));
testRunner.notifyDone();
}
}, false);
window.addEventListener("load", function() {
testDiv.scrollTop = 100;
});
</script>