chromium/third_party/blink/web_tests/fast/preloader/understands-base-tag.html

<body>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

window.addEventListener('DOMContentLoaded', function() {
    if (window.internals) {
        var success = internals.isPreloaded("resources/base-image1.png") && !internals.isPreloaded("base-image1.png")
            && !internals.isPreloaded("resources/foo.html");
        console.log(success ? "PASS" : "FAIL");
    }
}, false);
</script>
This test requires DumpRenderTree to see the log of what resources are loaded.
<script src=resources/non-existant.js></script>
<script>document.write("<plaintext>");</script>
<base href="resources/foo.html">
<img src="base-image1.png">