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