Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / resources / worker-replace-global-constructor.js
blob795d565eb5cde5f2413d92a5ff80ff1c76d01672
2 function log(message)
4     document.getElementById("result").innerHTML += message + "<br>";
7 if (window.testRunner) {
8     testRunner.dumpAsText();
9     testRunner.waitUntilDone();
12 var worker = createWorker();
13 worker.postMessage("eval self.MessageEvent = 'PASS'; MessageEvent;");
14 worker.postMessage("eval foo//bar");
16 worker.onmessage = function(evt) {
17     if (!/foo\/\/bar/.test(evt.data))
18         log(evt.data);
19     else {
20         log("DONE");
21         if (window.testRunner)
22             testRunner.notifyDone();
23     }