| OLD | NEW | 
|---|
|  | (Empty) | 
| 1 <!DOCTYPE html> |  | 
| 2 <html> |  | 
| 3 <head> |  | 
| 4 <title>WebCrypto On An Insecure Origin</title> |  | 
| 5 <script src="/resources/testharness.js"></script> |  | 
| 6 <script src="/resources/testharnessreport.js"></script> |  | 
| 7 <script src="/resources/get-host-info.js"></script> |  | 
| 8 </head> |  | 
| 9 <body></body> |  | 
| 10 <script> |  | 
| 11      if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |  | 
| 12          window.location = get_host_info().UNAUTHENTICATED_ORIGIN + |  | 
| 13                            window.location.pathname; |  | 
| 14      } else { |  | 
| 15          if (window.testRunner) |  | 
| 16              testRunner.overridePreference( |  | 
| 17                  "WebKitStrictPowerfulFeatureRestrictions", true); |  | 
| 18 |  | 
| 19          async_test(function () { |  | 
| 20              var worker = new Worker("resources/webcrypto-worker.js"); |  | 
| 21              worker.addEventListener("message", this.step_func(function (evt) { |  | 
| 22                  assert_equals(evt.data.message, |  | 
| 23                                'Only secure origins are allowed (see: ' + |  | 
| 24                                'https://goo.gl/Y0ZkNV).'); |  | 
| 25                  this.done(); |  | 
| 26              })); |  | 
| 27              worker.postMessage("go"); |  | 
| 28          }, "WebCrypto not allowed on insecure origin"); |  | 
| 29      } |  | 
| 30 </script> |  | 
| 31 </html> |  | 
| OLD | NEW | 
|---|