| testRunner.waitUntilDone(); |
| var div = document.createElement("div"); |
| document.getElementById("console").appendChild(div); |
| log("FAIL: The origin of the document was mutated."); |
| window.addEventListener("message", function (evt) { |
| var fr = document.getElementById("theFrame"); |
| if (evt.data == "step1-ready") { |
| fr.sandbox = "allow-scripts allow-same-origin"; |
| fr.contentWindow.postMessage("go", "*"); |
| } else if (evt.data == "step1-done") |
| fr.src = "resources/sandboxed-iframe-origin-add-step2.html"; |
| <p>Test that adding allow-origin after creating an iframe doesn't modify |
| the origin of an existing document, but it doesn modify the origin of the |
| <iframe id="theFrame" sandbox="allow-scripts" |
| src="resources/sandboxed-iframe-origin-add-step1.html"> |