diff options
Diffstat (limited to 'testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html')
-rw-r--r-- | testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html b/testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html new file mode 100644 index 0000000000..fde01775b7 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8" /> + <title>Iframe Transfer Size Prefetch</title> +</head> + +<body> + <p>Placeholder</p> + <script> + const urlToPrefetch = 'blank_page_prefetch.html'; + + function addLink() { + return new Promise(resolve => { + const link = document.createElement('link'); + link.onload = function () { resolve(); }; + link.rel = 'prefetch'; + link.as = 'document'; + link.href = urlToPrefetch; + document.body.appendChild(link); + }); + }; + + function navigateToPrefetchedUrl() { + document.location.href = urlToPrefetch; + } + </script> +</body> + +</html> |