| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Old Powerful Features on an Insecure Origin</title> | 4 <title>Old Powerful Features on an Insecure Origin</title> |
| 5 </head> | 5 </head> |
| 6 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <script src="/resources/get-host-info.js"></script> | 8 <script src="/resources/get-host-info.js"></script> |
| 9 | 9 |
| 10 <body> | 10 <body> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 })); | 82 })); |
| 83 }, 'device motion'); | 83 }, 'device motion'); |
| 84 | 84 |
| 85 async_test(function() { | 85 async_test(function() { |
| 86 testRunner.setMockDeviceOrientation(11.1, 22.2, 33.3, true); | 86 testRunner.setMockDeviceOrientation(11.1, 22.2, 33.3, true); |
| 87 | 87 |
| 88 window.addEventListener('deviceorientation', this.step_func(function() { | 88 window.addEventListener('deviceorientation', this.step_func(function() { |
| 89 this.done(); | 89 this.done(); |
| 90 })); | 90 })); |
| 91 }, 'device orientation'); | 91 }, 'device orientation'); |
| 92 | 92 |
| 93 promise_test(function(test) { | 93 promise_test(function(test) { |
| 94 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]); | 94 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]); |
| 95 }, 'requestMediaKeySystemAccess'); | 95 }, 'requestMediaKeySystemAccess'); |
| 96 | 96 |
| 97 // Tests for APIs that have been turned off on insecure origins | 97 // Tests for APIs that have been turned off on insecure origins |
| 98 async_test(function() { | 98 async_test(function() { |
| 99 navigator.webkitGetUserMedia({ audio: true, video: true }, | 99 navigator.webkitGetUserMedia({ audio: true, video: true }, |
| 100 this.unreached_func('navigator.webkitGetUserMedia should call the er
ror callback, but called the success callback instead.'), | 100 this.unreached_func('getUserMedia should call the error callback, bu
t called the success callback instead.'), |
| 101 this.step_func_done()); | 101 this.step_func_done()); |
| 102 }, 'navigator.webkitGetUserMedia'); | 102 }, 'getUserMedia'); |
| 103 | |
| 104 promise_test(function(test) { | |
| 105 return navigator.mediaDevices.getUserMedia({audio: true, video: true}).t
hen( | |
| 106 test.unreached_func("navigator.mediaDevices.getUserMedia should reje
ct the promise, but resolved instead."), | |
| 107 function(error) { | |
| 108 assert_equals(error.name, "NotSupportedError"); | |
| 109 assert_equals(error.message, "Only secure origins are allowed (s
ee: https://goo.gl/Y0ZkNV)."); | |
| 110 }); | |
| 111 }, 'navigator.mediaDevices.getUserMedia'); | |
| 112 } | 103 } |
| 113 </script> | 104 </script> |
| 114 </body> | 105 </body> |
| 115 </html> | 106 </html> |
| OLD | NEW |