Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / shared-worker-console-log.html
blobbf9bc9e21e9bf537fec2ef8a821ce0e7d153498e
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
11 function buildInlineSharedWorker() {
12 var script = document.getElementById('workerCode').innerText;
13 var blob = new Blob([script], {type: 'text/javascript'});
14 var worker = new SharedWorker(URL.createObjectURL(blob));
15 worker.port.start();
16 worker.port.postMessage({cmd: 'connect', id: "host"});
18 worker.port.addEventListener('message', function (e) {
19 if (e.data.done)
20 setTimeout(finishJSTest, 0);
21 });
23 return worker;
25 </script>
26 </head>
27 <body>
28 <!-- This script's body will be used to build a Blob URL to use as a Worker. -->
29 <script id="workerCode" type="text/plain">
30 console.log("log");
31 console.log(typeof console.log);
32 console.log(console.log.toString());
33 console.error("error");
34 console.warn("warn");
35 console.info("info");
36 console.debug("debug");
37 console.count("count");
38 console.time("time");
40 // FIXME(slightlyoff): these aren't getting logged properly from here!
41 console.timeEnd("time");
42 console.assert(true);
43 console.assert(false);
44 console.markTimeline("markTimeline");
46 self.addEventListener("connect", function (e) {
47 var port = e.ports[0];
48 port.postMessage({ done: true });
49 });
50 </script>
51 <script>
52 window.jsTestIsAsync = true;
53 description("This tests that 'console.log' and friends function correctly from workers.");
54 buildInlineSharedWorker();
55 </script>
56 </body>
57 </html>