diff options
Diffstat (limited to 'LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html')
-rw-r--r-- | LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html new file mode 100644 index 0000000..2d5d76c --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html @@ -0,0 +1,20 @@ +<body> +<script> +if (window.layoutTestController) + layoutTestController.dumpAsText(); +</script> +<html> +<p>This test passes if it doesn't crash.</p> +<div id="frag"></div> +<script> +// Fun with innerHTML. +document.getElementById('frag').innerHTML = '<link href="prefetch.link" rel="prefetch">'; + +// Fun with detached documents. +var doc = document.implementation.createDocument('application/html+xml'); +var lnk = doc.createElement('link'); +lnk.setAttribute('rel', 'prefetch'); +lnk.setAttribute('href', 'prefetch.link'); +doc.documentElement.appendChild(lnk); +</script> +</html> |