prefetch-detached.html revision abd0b16f66097fb5317221db993dafb6bd965965
1<body>
2<script>
3if (window.layoutTestController)
4    layoutTestController.dumpAsText();
5</script>
6<html>
7<p>This test passes if it doesn't crash.</p>
8<div id="frag"></div>
9<script>
10// Fun with innerHTML.
11document.getElementById('frag').innerHTML = '<link href="prefetch.link" rel="prefetch">';
12
13// Fun with detached documents.
14var doc = document.implementation.createDocument('application/html+xml');
15var lnk = doc.createElement('link');
16lnk.setAttribute('rel', 'prefetch');
17lnk.setAttribute('href', 'prefetch.link');
18doc.documentElement.appendChild(lnk);
19</script>
20</html>
21