| <html> |
| <!-- |
| A page that fetches only "prefetch.js" when scanned by NoStatePrefetch, and |
| fetches "prefetch2.js" in addition to that if javascript execution is preformed |
| on the page. In all cases the scripts are executed in a blocking manner. |
| |
| By prefetching this page a browsertest can verify that javascript was not |
| executed (prefetch2.js should not be requested to load even after the page has |
| been fully prefetched (or loaded)). |
| |
| Note: there is no way to ensure that the script loaded via .appendChild() or a |
| sync XHR happens before a preload-scannable request because preload scanner is |
| racy and often fetches resources it sees before the inline script has a chance |
| to execute. |
| --> |
| <body> |
| <script src="prefetch.js"></script> |
| <script> |
| var s = document.createElement("script"); |
| s.src = "prefetch2.js"; |
| document.body.appendChild(s); |
| </script> |
| Some content that is necessary for registering paint metrics. |
| </body> |
| </html> |