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

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

Issue 1530403002: Removal of geolocation APIs on insecure origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Rebase on ToT Created 4 years, 11 months 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..e210885375af241d5e98c1b907e66c3611f97785 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,47 +30,16 @@ 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,
0);
-
- window.addEventListener('devicemotion', this.step_func(function() {
- this.done();
- }));
+ window.addEventListener('devicemotion', this.step_func_done());
}, 'device motion');
async_test(function() {
testRunner.setMockDeviceOrientation(11.1, 22.2, 33.3, true);
-
- window.addEventListener('deviceorientation', this.step_func(function() {
- this.done();
- }));
+ window.addEventListener('deviceorientation', this.step_func_done());
}, 'device orientation');
promise_test(function(test) {
@@ -79,6 +48,21 @@ 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.unreached_func('getCurrentPosition should fail, but succeeded.'),
+ this.step_func_done());
+ }, 'getCurrentPosition');
+
+ // Note that the deprecation message for watchPosition() will be suppressed
+ // 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.unreached_func('watchPosition should fail, but succeeded.'),
+ this.step_func_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());

Powered by Google App Engine
This is Rietveld 408576698