Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html b/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| index d6f795161da9a8fd90717ec5b38ffc469ef792c1..2ecd94dcb8a59bbb72c9056226904ac6bf2cc581 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html |
| @@ -30,31 +30,6 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| // Tests for APIs that are deprecated, but still allowed, on |
| // insecure origins |
| async_test(function() { |
| - navigator.geolocation.getCurrentPosition( |
| - this.step_func(function() { |
| - this.done(); |
| - }), |
| - this.step_func(function(error) { |
| - assert_unreached('getCurrentPosition should succeed, but failed.'); |
| - this.done(); |
| - })); |
| - }, 'getCurrentPosition'); |
| - |
| - // Note that the deprecation message for watchPosition() will be supressed |
| - // because it is an exact duplicate of the getCurrentPosition() message. |
| - // Thus, this test is really to confirm that it still executes. |
| - async_test(function() { |
| - navigator.geolocation.watchPosition( |
| - this.step_func(function() { |
| - this.done(); |
| - }), |
| - this.step_func(function(error) { |
| - assert_unreached('watchPosition should succeed, but failed.'); |
| - this.done(); |
| - })); |
| - }, 'watchPosition'); |
| - |
| - async_test(function() { |
| testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0, |
| true, 0, true, 0, true, 0, |
| true, 0, true, 0, true, 0, |
| @@ -79,6 +54,32 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| // Tests for APIs that have been turned off on insecure origins |
| async_test(function() { |
| + navigator.geolocation.getCurrentPosition( |
| + this.step_func(function() { |
| + assert_unreached('getCurrentPosition should fail, but succeeded.'); |
| + this.done(); |
|
philipj_slow
2015/12/01 08:45:21
This line won't be reached, because assert_unreach
jww
2015/12/01 18:31:54
Done.
|
| + }), |
| + this.step_func(function(error) { |
|
philipj_slow
2015/12/01 08:45:21
And this could be just this.step_func_done().
jww
2015/12/01 18:31:54
Done.
|
| + this.done(); |
| + })); |
| + }, 'getCurrentPosition'); |
| + |
| + // Note that the deprecation message for watchPosition() will be supressed |
| + // because it is an exact duplicate of the getCurrentPosition() message. |
| + // Thus, this test is really to confirm that it still executes (and fails). |
| + |
| + async_test(function() { |
| + navigator.geolocation.watchPosition( |
| + this.step_func(function() { |
| + assert_unreached('watchPosition should fail, but succeeded.'); |
| + this.done(); |
| + }), |
| + this.step_func(function(error) { |
| + this.done(); |
| + })); |
| + }, 'watchPosition'); |
| + |
| + async_test(function() { |
| navigator.webkitGetUserMedia({ audio: true, video: true }, |
| this.unreached_func('navigator.webkitGetUserMedia should call the error callback, but called the success callback instead.'), |
| this.step_func_done()); |