Chromium Code Reviews| Index: LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| diff --git a/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html b/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| index e484c5a5f77f6a5927ae447d478d85e27a7d11d1..0de10df78091f1dbd36269d29f5cec291dc7ba89 100644 |
| --- a/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| +++ b/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| @@ -27,6 +27,8 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| mockLongitude, |
| mockAccuracy); |
| + // Tests for APIs that are deprecated, but still allowed, on |
| + // insecure origins |
| async_test(function() { |
| navigator.geolocation.getCurrentPosition( |
| this.step_func(function() { |
| @@ -70,17 +72,6 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| }, 'fullscreen'); |
| async_test(function() { |
| - navigator.webkitGetUserMedia({ audio: true, video: true }, |
| - this.step_func(function() { |
| - this.done(); |
| - }), |
| - this.step_func(function() { |
| - assert_unreached('getUserMedia should succeed, but failed.'); |
| - this.done(); |
| - })); |
| - }, 'getUserMedia'); |
| - |
| - async_test(function() { |
| testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0, |
| true, 0, true, 0, true, 0, |
| true, 0, true, 0, true, 0, |
| @@ -102,6 +93,24 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| promise_test(function(test) { |
| return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]); |
| }, 'requestMediaKeySystemAccess'); |
| + |
| + // Tests for APIs that have been turned off on insecure origins |
| + async_test(function() { |
| + try { |
| + navigator.webkitGetUserMedia({ audio: true, video: true }, |
| + this.step_func(function() { |
| + assert_unreached('getUserMedia should throw an exception, but called the "success" callback.'); |
| + }), |
| + this.step_func(function() { |
| + assert_unreached('getUserMedia should throw an exception, but called the "fail" callback.'); |
|
Mike West
2015/08/18 00:28:38
You probably don't need both of these. In fact, I'
philipj_slow
2015/08/18 08:35:09
Agreed, that would also get rid of the wrapping tr
jww
2015/08/18 16:27:12
Assuming we change this failure to an error callba
|
| + })); |
| + } catch (e) { |
| + this.step(function() { |
| + this.done(); |
| + }); |
| + } |
| + }, 'getUserMedia'); |
| + |
| } |
| </script> |
| </body> |