31 lines
859 B
HTML
31 lines
859 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
function checkForPreload() {
|
|
var result;
|
|
if (internals.isPreloaded("resources/image1.png") && internals.isPreloaded("resources/style1.css"))
|
|
result = "PASS";
|
|
else
|
|
result = "FAIL";
|
|
document.getElementsByTagName("body")[0].appendChild(document.createTextNode(result));
|
|
}
|
|
|
|
window.addEventListener("DOMContentLoaded", checkForPreload, false);
|
|
</script>
|
|
<script src=resources/non-existant.js></script>
|
|
</head>
|
|
<body>
|
|
<script>document.write("<plaintext>");</script>
|
|
This tests that resources in the body which block parsing (script, css) are preloaded
|
|
ahead of other resources (images). It requires DumpRenderTree to see the log of what
|
|
resources are loaded.
|
|
<img src=resources/image1.png>
|
|
<style>
|
|
@import "resources/style1.css";
|
|
</style>
|
|
</body>
|
|
</html>
|