| <iframe src="resources/innocent-victim.html"></iframe> | |
| <div id="console">FAIL</div> | |
| <script> | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| window.onload = function() { | |
| window.f = frames[0].atob; | |
| try { | |
| document.domain = "0.0.2"; | |
| } catch (e) { | |
| if ("message" in e || (e.message.search("SecurityError:") != -1)) { | |
| document.getElementById("console").innerHTML = "PASS" | |
| return | |
| } | |
| } | |
| if (btoa(window.f("TEST")) == "TEST") | |
| document.getElementById("console").innerHTML = "FAIL" | |
| } | |
| </script> |