chromium/third_party/blink/web_tests/fast/files/workers/inline-worker-via-blob-url.html

<!DOCTYPE html>
<html>
<head>
<script>
function log(message)
{
    document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
}

function runTest()
{
    log("Test inline web worker via blob URL.");
    var string = [
        "onmessage = function(e) {",
        "    postMessage('Hello from worker');",
        "};"
    ].join('\n');
    var blobURL = URL.createObjectURL(new Blob([string]));
    var worker = new Worker(blobURL);
    worker.onmessage = function(event) {
        log(event.data);
        log("DONE");
        if (testRunner.notifyDone)
            testRunner.notifyDone();
    };
    worker.postMessage("hi");
}

if (window.testRunner) {
    testRunner.setAllowFileAccessFromFileURLs(true);
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}
</script>
</head>
<body onload="runTest()">
<pre id='console'></pre>
</body>
</html>