Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html

Issue 1485973002: Removal of geolocation APIs on insecure origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698