<body>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function test()
{
if (window.internals) {
console.log((internals.isPreloaded("resources/image1.png") ? "PASS" : "FAIL") + ": image1.png");
console.log((internals.isPreloaded("resources/non-existant.js") ? "PASS" : "FAIL") + ": non-existant.js");
}
}
window.addEventListener('DOMContentLoaded', function () {
test();
setTimeout(function() {
test();
if (window.testRunner) {
testRunner.notifyDone();
}
}, 100);
}, false);
</script>
internals.isPreloaded() should remain the same even after
ResourceFetcher::clearPreloads() is called (around document's load event).
crbug.com/643621
<script src=resources/non-existant.js></script>
<script>document.write("<plaintext>");</script>
<img src=resources/image1.png>