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

Side by Side Diff: content/test/data/workers/worker_common.js

Issue 859213006: Cancel client auth requests when not promptable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client-auth-cancel-1
Patch Set: worker_common.js was missing a license header (also a rebase) Created 5 years, 9 months 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
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 // Track the number of clients for this worker - tests can use this to ensure 5 // Track the number of clients for this worker - tests can use this to ensure
2 // that shared workers are actually shared, not distinct. 6 // that shared workers are actually shared, not distinct.
3 var num_clients = 0; 7 var num_clients = 0;
4 8
5 if (!self.postMessage) { 9 if (!self.postMessage) {
6 // This is a shared worker - mimic dedicated worker APIs 10 // This is a shared worker - mimic dedicated worker APIs
7 onconnect = function(event) { 11 onconnect = function(event) {
8 num_clients++; 12 num_clients++;
9 event.ports[0].onmessage = function(e) { 13 event.ports[0].onmessage = function(e) {
10 self.postMessage = function(msg) { 14 self.postMessage = function(msg) {
(...skipping 11 matching lines...) Expand all
22 else if (evt.data == "auth") 26 else if (evt.data == "auth")
23 importScripts("/auth-basic"); 27 importScripts("/auth-basic");
24 else if (evt.data == "close") 28 else if (evt.data == "close")
25 close(); 29 close();
26 else if (/eval.+/.test(evt.data)) { 30 else if (/eval.+/.test(evt.data)) {
27 try { 31 try {
28 postMessage(eval(evt.data.substr(5))); 32 postMessage(eval(evt.data.substr(5)));
29 } catch (ex) { 33 } catch (ex) {
30 postMessage(ex); 34 postMessage(ex);
31 } 35 }
36 } else if (/tls-client-auth.+/.test(evt.data)) {
37 try {
38 importScripts(evt.data.substr(16));
39 } catch (ex) {
40 }
41 postMessage("done");
32 } 42 }
33 } 43 }
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | content/test/data/workers/worker_tls_client_auth.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698