Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / data / workers / incognito_worker.html
blobd8ba3ace438f32ae3fea34eb27e44d9550449faa
1 <html>
3 <head>
4 <title>Incognito Worker Test</title>
6 <script src="worker_utils.js"></script>
8 <script>
9 var worker = new SharedWorker("incognito_worker.js");
10 // Worker should only get a single connect event.
11 worker.port.onmessage = function(evt) {
12 if (evt.data != 1) {
13 // This instance should not be shared with other pre-existing instances,
14 // so the connect count should be 1.
15 onFailure();
16 return;
18 // Make a second worker, make sure it shares this instance
19 var worker = new SharedWorker("incognito_worker.js");
20 worker.port.onmessage = function(evt) {
21 if (evt.data == 2)
22 onSuccess();
23 else
24 onFailure();
28 </script>
29 </head>
31 <body>
32 <div id=statusPanel></div>
33 </body>
34 </html>