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>
Several editing tests that copy & paste slow down Mac WK2 EWS
......
......@@ -22,6 +22,8 @@
firstPageVisits++;
if (firstPageVisits < 3)
target.postMessage('navigate-other-page', '*');
if (firstPageVisits == 3)
window.testRunner.notifyDone();
return;
}
......@@ -32,12 +34,6 @@
break;
case 2:
target.postMessage('navigate-back', '*');
// Wait a bit for resource load callbacks
setTimeout(function () {
target.close();
if (window.testRunner)
window.testRunner.notifyDone();
}, 200);
break;
}
return;
......
......@@ -18,6 +18,6 @@
}
</script>
</head>
<body onload="registerListeners();">
<body onpageshow="registerListeners();">
</body>
</html>
......@@ -24,6 +24,6 @@
}
</script>
</head>
<body onload="registerListeners();">
<body onpageshow="registerListeners();">
</body>
</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