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..60b4284946aeccc6e9ce47f56eec6ae0577e889e 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,17 @@ 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() { |
| + navigator.webkitGetUserMedia({ audio: true, video: true }, |
| + this.step_func(function() { |
| + assert_unreached('getUserMedia should throw an exception, but called the "success" callback.'); |
|
philipj_slow
2015/08/20 09:49:18
Actually it should call the error callback :)
Als
jww
2015/08/20 15:29:45
Done.
|
| + }), |
| + this.step_func(function() { |
| + this.done(); |
|
philipj_slow
2015/08/20 09:49:17
Can be written as this.step_func_done().
jww
2015/08/20 15:29:45
Done.
|
| + })); |
| + }, 'getUserMedia'); |
| } |
| </script> |
| </body> |