Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 <!--
2 Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/
4 -->
5 <!DOCTYPE HTML>
6 <html>
7 <head>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js">
9 </script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <script type="text/javascript">
14 const message = "hi";
15 const url = "DATA:text/plain," +
16 "onmessage = function(event) {" +
17 " postMessage(event.data);" +
18 "};";
20 var worker = new Worker(url);
21 worker.onmessage = function(event) {
22 is(event.data, message, "Got correct message");
23 SimpleTest.finish();
24 };
25 worker.postMessage(message);
27 SimpleTest.waitForExplicitFinish();
28 </script>
29 </body>
30 </html>