<p>Tests origin allowlisting with IP addresses.</p>
<pre id="console"></pre>
<script>
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.addOriginAccessAllowListEntry("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-allowlisting-ip-address-test.html";
window.addEventListener("message", function(e) {
    if (e.data == "DONE")
        testRunner.notifyDone();
    else
        log(e.data);
}, false);
</script>
