| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <script> | |
| 3 // Pre-conditions | |
| 4 // - Error page handling is supported on DRT. | |
| 5 | |
| 6 // Navigation steps: | |
| 7 // 1- loads this page. | |
| 8 // 2- loads a non-existent page (an error page is loaded). | |
| 9 // 4- executes a back, forward and back navigations. | |
| 10 | |
| 11 // Expected results: | |
| 12 // - forward-list should comprise the non-existent loaded page(2). | |
| 13 | |
| 14 var isOkToContinue = " "+ | |
| 15 "{ "+ | |
| 16 " var console = document.getElementById('console'); "+ | |
| 17 " if (console != null) "+ | |
| 18 " console.innerHTML = 'SUCCESS'; "+ | |
| 19 " else "+ | |
| 20 " console.innerHTML = 'FAIL'; "+ | |
| 21 "}"; | |
| 22 | |
| 23 if (window.testRunner) { | |
| 24 testRunner.dumpAsText(); | |
| 25 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); | |
| 26 testRunner.handleErrorPages(); | |
| 27 testRunner.dumpBackForwardList(); | |
| 28 } | |
| 29 | |
| 30 function onPageShow(evt) | |
| 31 { | |
| 32 if (!evt.persisted) { | |
| 33 // this is the first time the page has been loaded, then setup the | |
| 34 // to-be-tested scenario. | |
| 35 testRunner.queueLoad("./non-existent.html"); | |
| 36 testRunner.queueBackNavigation(1); | |
| 37 testRunner.queueForwardNavigation(1); | |
| 38 testRunner.queueBackNavigation(1); | |
| 39 testRunner.queueNonLoadingScript("eval(\"" + isOkToContinue + "\")")
; | |
| 40 } | |
| 41 } | |
| 42 | |
| 43 window.onpageshow = onPageShow; | |
| 44 </script> | |
| 45 <body> | |
| 46 <h1 id='console'/> | |
| 47 </body> | |
| 48 </html> | |
| OLD | NEW |