Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/test/data/workers/incognito_worker.html

Issue 441022: Changed shared worker code so incognito windows do not have access to non-incognito shared workers. (Closed)
Patch Set: Removed superfluous valgrind change. Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2
3 <head>
4 <title>Incognito Worker Test</title>
5
6 <script src="worker_utils.js"></script>
7
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;
17 }
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();
25 };
26 };
27
28 </script>
29 </head>
30
31 <body>
32 <div id=statusPanel></div>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698