blob: a40e934f74ab40c948edf83c70750e118387d546 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
a:focus {
background: yellow;
}
</style>
<script>
function runTest() {
if (window.testRunner) {
testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
testRunner.waitUntilDone();
}
window.onpageshow = function(e) {
if (e.persisted) {
document.getElementById("a3").focus();
if (window.testRunner)
testRunner.notifyDone();
} else {
document.getElementById("a2").focus();
}
};
setTimeout(function() {
window.location.href = "data:text/html,<body onload='history.back()'></body>";
}, 0);
}
</script>
</head>
<body onload='runTest();'>
<a id="a1" href="#">1</a>
<a id="a2" href="#">2</a>
<a id="a3" href="#">3</a>
</body>
</html>