<!DOCTYPE html>
<body>
<script>
if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}
function test() {
    try {
        if (window.internals) {
            const host = internals.windowLocationHost(testFrame.contentWindow);
            document.body.innerHTML = host === "" ? "PASS" : "FAIL, got " + host;
        }
    } catch (e) {
        console.log(e);
    }

    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
<iframe id="testFrame" onload="test()" src="javascript://example.org/alert('test')"></iframe>
</body>
