Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / worker-console-log.html
blob3066c1f6d7f8f327525f13c5d720dfeab49d68bb
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 window.isOnErrorTest = true;
6 </script>
7 <script src="../../resources/js-test.js"></script>
8 <script>
9 function buildInlineWorker() {
10 var script = document.getElementById('workerCode').innerText;
11 var blob = new Blob([script], {type: 'text/javascript'});
12 var worker = new Worker(URL.createObjectURL(blob));
14 worker.addEventListener('message', function (e) {
15 if (e.data.done)
16 return finishJSTest();
17 });
19 return worker;
21 </script>
22 </head>
23 <body>
24 <!-- This script's body will be used to build a Blob URL to use as a Worker. -->
25 <script id="workerCode" type="text/plain">
26 console.log("log");
27 console.log(typeof console.log);
28 console.log(console.log.toString());
29 console.error("error");
30 console.warn("warn");
31 console.info("info");
32 console.debug("debug");
33 console.count("count");
34 console.time("time");
36 // FIXME(slightlyoff): these aren't getting logged properly from here!
37 console.timeEnd("time");
38 console.assert(true);
39 console.assert(false);
40 console.markTimeline("markTimeline");
42 this.postMessage({ done: true });
43 </script>
44 <script>
45 window.jsTestIsAsync = true;
46 description("This tests that 'console.log' and friends function correctly from workers.");
47 buildInlineWorker();
48 </script>
49 </body>
50 </html>