| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 | 2 |
| 3 <head> | 3 <head> |
| 4 <title>Worker TLS Client Auth Test</title> | 4 <title>Worker TLS Client Auth Test</title> |
| 5 | 5 |
| 6 <script src="worker_utils.js"></script> | 6 <script src="worker_utils.js"></script> |
| 7 | 7 |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 // TODO(davidben): When URLSearchParams is stable and implemented, switch this | 10 var parms = new URLSearchParams(location.search); |
| 11 // (and a lot of other test code) to it. https://crbug.com/303152 | 11 var test = parms.get("test"); |
| 12 var url = decodeURIComponent(/url=([^&]*)/.exec(location.search)[1]); | 12 var url = parms.get("url"); |
| 13 var worker = getWorker("worker_common.js"); | 13 var worker = getWorker("worker_common.js"); |
| 14 worker.onmessage = function(ev) { | 14 worker.onmessage = function(ev) { |
| 15 if (ev.data == "done") | 15 if (ev.data == "done") |
| 16 onSuccess(); | 16 onSuccess(); |
| 17 }; | 17 }; |
| 18 worker.postMessage("tls-client-auth " + url); | 18 if (test == "import") { |
| 19 worker.postMessage("tls-client-auth-import " + url); |
| 20 } else if (test == "fetch") { |
| 21 worker.postMessage("tls-client-auth-fetch " + url); |
| 22 } |
| 19 </script> | 23 </script> |
| 20 </head> | 24 </head> |
| 21 | 25 |
| 22 <body> | 26 <body> |
| 23 <div id=statusPanel></div> | 27 <div id=statusPanel></div> |
| 24 </body> | 28 </body> |
| 25 </html> | 29 </html> |
| OLD | NEW |