blob: 3abbb270f2b0f9a2d38efff48177d0142618cf34 [file] [log] [blame]
<p>Tests origin whitelisting with IP addresses.</p>
<pre id="console"></pre>
<script>
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.addOriginAccessWhitelistEntry("http://localhost:8000", "http", "127.0.0.1", false);
function log(message)
{
document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
}
var iframe = document.createElement("iframe");
document.body.appendChild(iframe);
iframe.src = "http://localhost:8000/xmlhttprequest/resources/origin-whitelisting-ip-address-test.html";
window.addEventListener("message", function(e) {
if (e.data == "DONE")
testRunner.notifyDone();
else
log(e.data);
}, false);
</script>