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

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

Issue 1515103003: Revert of Removal of geolocation APIs on insecure origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years 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 a5c0f38c659a273b3a7a9e4bb56cb70d7cae7a05..d6f795161da9a8fd90717ec5b38ffc469ef792c1 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,16 +30,47 @@
// 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_done());
+
+ window.addEventListener('devicemotion', this.step_func(function() {
+ this.done();
+ }));
}, 'device motion');
async_test(function() {
testRunner.setMockDeviceOrientation(11.1, 22.2, 33.3, true);
- window.addEventListener('deviceorientation', this.step_func_done());
+
+ window.addEventListener('deviceorientation', this.step_func(function() {
+ this.done();
+ }));
}, 'device orientation');
promise_test(function(test) {
@@ -47,21 +78,6 @@
}, 'requestMediaKeySystemAccess');
// 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 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.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.'),

Powered by Google App Engine
This is Rietveld 408576698