file_null_baseuri.html (796B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Bug 1121857 - document.baseURI should not get blocked if baseURI is null</title> 5 </head> 6 <body> 7 <script type="text/javascript"> 8 // check the initial base-uri 9 window.parent.postMessage({baseURI: document.baseURI, test: "initial_base_uri"}, "*"); 10 11 // append a child and check the base-uri 12 var baseTag = document.head.appendChild(document.createElement('base')); 13 baseTag.href = 'http://www.base-tag.com'; 14 window.parent.postMessage({baseURI: document.baseURI, test: "changed_base_uri"}, "*"); 15 16 // remove the child and check that the base-uri is back to the initial one 17 document.head.remove(baseTag); 18 window.parent.postMessage({baseURI: document.baseURI, test: "initial_base_uri"}, "*"); 19 </script> 20 </body> 21 </html>