chromium/third_party/blink/web_tests/http/tests/eventsource/workers/eventsource-simple.html

<html>
<body>
<p>Test EventSource in a worker.</p>
<div id="result"></div>
<script>
function log(msg) {
    document.getElementById("result").innerHTML += msg + "<br>";
}

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

var worker = new Worker("resources/simple-worker.js");

worker.onmessage = function (evt) {
    if (evt.data == "hello")
        log("PASS");
    else
        log("FAIL");
    end();
}

worker.onerror = function () {
    log("FAIL");
    end();
}

function end() {
    if (window.testRunner)
        testRunner.notifyDone();
}

</script>
</body>
</html>