Fix loader/go-back-cached-main-resource.html test

https://bugs.webkit.org/show_bug.cgi?id=116670

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-05-23
Reviewed by Alexey Proskuryakov.

The page does not get an onload when being restored from page cache. The
test case case is modified to handle pageshow event instead.

* loader/go-back-cached-main-resource.html: Wait for the third
'first-page' message to finish the test.
* loader/resources/first-page.html: Use onpageshow instead of onload.
* loader/resources/other-page.html: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5dac9ac8
2013-05-23 Manuel Rego Casasnovas <rego@igalia.com>
Fix loader/go-back-cached-main-resource.html test
https://bugs.webkit.org/show_bug.cgi?id=116670
Reviewed by Alexey Proskuryakov.
The page does not get an onload when being restored from page cache. The
test case case is modified to handle pageshow event instead.
* loader/go-back-cached-main-resource.html: Wait for the third
'first-page' message to finish the test.
* loader/resources/first-page.html: Use onpageshow instead of onload.
* loader/resources/other-page.html: Ditto.
2013-05-23 Ryosuke Niwa <rniwa@webkit.org> 2013-05-23 Ryosuke Niwa <rniwa@webkit.org>
Several editing tests that copy & paste slow down Mac WK2 EWS Several editing tests that copy & paste slow down Mac WK2 EWS
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
firstPageVisits++; firstPageVisits++;
if (firstPageVisits < 3) if (firstPageVisits < 3)
target.postMessage('navigate-other-page', '*'); target.postMessage('navigate-other-page', '*');
if (firstPageVisits == 3)
window.testRunner.notifyDone();
return; return;
} }
...@@ -32,12 +34,6 @@ ...@@ -32,12 +34,6 @@
break; break;
case 2: case 2:
target.postMessage('navigate-back', '*'); target.postMessage('navigate-back', '*');
// Wait a bit for resource load callbacks
setTimeout(function () {
target.close();
if (window.testRunner)
window.testRunner.notifyDone();
}, 200);
break; break;
} }
return; return;
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
} }
</script> </script>
</head> </head>
<body onload="registerListeners();"> <body onpageshow="registerListeners();">
</body> </body>
</html> </html>
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
} }
</script> </script>
</head> </head>
<body onload="registerListeners();"> <body onpageshow="registerListeners();">
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment