chromium/third_party/blink/web_tests/http/tests/preload/delaying_onload_link_preload_after_discovery.html

<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
    var t = async_test('Makes sure link preload preloaded resources are delaying onload after discovery');
</script>
<link rel=preload href="http://127.0.0.1:8000/resources/slow-script.pl?delay=200" as=script>
<link rel=preload href="http://127.0.0.1:8000/resources/slow-image.php?name=square.png&mimeType=image/png&sleep=400" as=image>
<script>
    window.addEventListener("load", t.step_func(function() {
        assert_equals(performance.getEntriesByType("resource").length, 4);
        t.done();
    }));
    document.write('<sc' + 'ript src="../resources/slow-script.pl?delay=200"></sc' + 'ript>');
    document.write("<!--");
    var img = new Image();
    img.src = "http://127.0.0.1:8000/resources/slow-image.php?name=square.png&mimeType=image/png&sleep=400";
</script>