| <html> |
| <head> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| function checkForPreload() { |
| var result; |
| if (internals.isPreloaded("resources/image1.png") && internals.isPreloaded("resources/script1.js")) |
| 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> |
| <script src=resources/script1.js></script> |
| </body> |
| </html> |