Bug 1685822 [wpt PR 27117] - [Import Maps] Add tests for rejecting multiple import...
[gecko.git] / dom / security / test / csp / file_null_baseuri.html
blobf995688b130588191d25e99ebf138bc37f605675
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"}, "*");
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"}, "*");
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>