Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / iframe-no-src-set-location.html
blobdfb233c8546b54698be36475498b6860cfbaf8f7
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 var iframeHasLoadedFirstPage = false;
12 function runTest()
14 if (!iframeHasLoadedFirstPage) {
15 iframeHasLoadedFirstPage = true;
17 shouldBe("document.getElementById('theFrame').contentDocument.baseURI", "'about:blank'");
18 var iframe = document.getElementById('theFrame');
19 iframe.src = "javascript:document.location.replace('./resources/iframe-no-src-set-location-pass.html')";
20 } else {
21 shouldBe("document.getElementById('theFrame').contentDocument.body.innerHTML", "'PASS\\n'");
23 isSuccessfullyParsed();
25 if (window.testRunner) {
26 testRunner.notifyDone();
31 </script>
32 </head>
33 <body>
34 <script>
35 description("This tests that an iframe with no src attribute uses the parent document's URL as a base when resolving non-fully-qualified URLs set by JavaScript.");
36 </script>
37 <iframe id="theFrame" onload="runTest()"></iframe>
38 </body>
39 </html>