blob: 7f26c2c2bb7dec4239fc85aed1a99b35a7c400ca [file] [log] [blame]
<html>
<script>
// Pre-conditions
// - Error page handling is supported on DRT.
// Navigation steps:
// 1- loads this page.
// 2- loads a non-existent page (an error page is loaded).
// 4- executes a back, forward and back navigations.
// Expected results:
// - forward-list should comprise the non-existent loaded page(2).
var isOkToContinue = " "+
"{ "+
" var console = document.getElementById('console'); "+
" if (console != null) "+
" console.innerHTML = 'SUCCESS'; "+
" else "+
" console.innerHTML = 'FAIL'; "+
"}";
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
layoutTestController.handleErrorPages();
layoutTestController.dumpBackForwardList();
}
function onPageShow(evt)
{
if (!evt.persisted) {
// this is the first time the page has been loaded, then setup the
// to-be-tested scenario.
layoutTestController.queueLoad("./non-existent.html");
layoutTestController.queueBackNavigation(1);
layoutTestController.queueForwardNavigation(1);
layoutTestController.queueBackNavigation(1);
layoutTestController.queueNonLoadingScript("eval(\"" + isOkToContinue + "\")");
}
}
window.onpageshow = onPageShow;
</script>
<body>
<h1 id='console'/>
</body>
</html>