| 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 var parms = new URLSearchParams(location.search); | 10 // TODO(davidben): When URLSearchParams is stable and implemented, switch this |
| 11 var test = parms.get("test"); | 11 // (and a lot of other test code) to it. https://crbug.com/303152 |
| 12 var url = parms.get("url"); | 12 var url = decodeURIComponent(/url=([^&]*)/.exec(location.search)[1]); |
| 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 if (test == "import") { | 18 worker.postMessage("tls-client-auth " + url); |
| 19 worker.postMessage("tls-client-auth-import " + url); | |
| 20 } else if (test == "fetch") { | |
| 21 worker.postMessage("tls-client-auth-fetch " + url); | |
| 22 } | |
| 23 </script> | 19 </script> |
| 24 </head> | 20 </head> |
| 25 | 21 |
| 26 <body> | 22 <body> |
| 27 <div id=statusPanel></div> | 23 <div id=statusPanel></div> |
| 28 </body> | 24 </body> |
| 29 </html> | 25 </html> |
| OLD | NEW |