| OLD | NEW | 
|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 <html> | 2 <html manifest="/security/powerfulFeatureRestrictions/resources/simple.manifest"
     > | 
| 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> | 
| 11 <div id="target"></div> | 11 <div id="target"></div> | 
| 12 <script> | 12 <script> | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 73     }, 'navigator.webkitGetUserMedia'); | 73     }, 'navigator.webkitGetUserMedia'); | 
| 74 | 74 | 
| 75     promise_test(function(test) { | 75     promise_test(function(test) { | 
| 76         return navigator.mediaDevices.getUserMedia({audio: true, video: true}).t
     hen( | 76         return navigator.mediaDevices.getUserMedia({audio: true, video: true}).t
     hen( | 
| 77             test.unreached_func("navigator.mediaDevices.getUserMedia should reje
     ct the promise, but resolved instead."), | 77             test.unreached_func("navigator.mediaDevices.getUserMedia should reje
     ct the promise, but resolved instead."), | 
| 78             function(error) { | 78             function(error) { | 
| 79                 assert_equals(error.name, "NotSupportedError"); | 79                 assert_equals(error.name, "NotSupportedError"); | 
| 80                 assert_equals(error.message, "Only secure origins are allowed (s
     ee: https://goo.gl/Y0ZkNV)."); | 80                 assert_equals(error.message, "Only secure origins are allowed (s
     ee: https://goo.gl/Y0ZkNV)."); | 
| 81             }); | 81             }); | 
| 82     }, 'navigator.mediaDevices.getUserMedia'); | 82     }, 'navigator.mediaDevices.getUserMedia'); | 
|  | 83 | 
|  | 84     async_test(function() { | 
|  | 85         var cached = this.step_func(function() { | 
|  | 86             var test = this; | 
|  | 87             fetch("/security/powerfulFeatureRestrictions/resources/simple.txt") | 
|  | 88                 .then(this.step_func(function(response) { | 
|  | 89                     assert_equals(response.status, 200); | 
|  | 90                     response.text().then(this.step_func_done(function(data) { | 
|  | 91                         assert_equals(data, "Hello, World!"); | 
|  | 92                     })); | 
|  | 93                 })) | 
|  | 94                 .catch(this.unreached_func("fetch() for cachable resource unexpe
     ctedly failed")); | 
|  | 95         }); | 
|  | 96 | 
|  | 97         applicationCache.addEventListener('cached', cached, false); | 
|  | 98     }, 'appcache'); | 
| 83 } | 99 } | 
| 84 </script> | 100 </script> | 
| 85 </body> | 101 </body> | 
| 86 </html> | 102 </html> | 
| OLD | NEW | 
|---|