chromium/third_party/blink/web_tests/http/tests/xmlhttprequest/sync-after-async-same-resource.html

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

var asyncFinished = false;
var syncFinished = false;

function finish() {
    if (asyncFinished && syncFinished) 
        testRunner.notifyDone();
}


var asyncxhr = new XMLHttpRequest();
asyncxhr.onreadystatechange = function() {
    if (asyncxhr.readyState != 4)
        return;
    asyncFinished = true;
    finish();
};
asyncxhr.open("GET", "resources/get.txt", true);
asyncxhr.send();

var syncxhr = new XMLHttpRequest();
syncxhr.open("GET", "resources/get.txt", false);
syncxhr.send();
document.body.appendChild(document.createTextNode(syncxhr.responseText));
syncFinished = true;

finish();
</script>
</body>