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

Side by Side Diff: LayoutTests/http/tests/security/powerfulFeatureRestrictions/geolocation-on-insecure-origin.html

Issue 1060723002: Replace secure origin warning shortlink with an HTTPS shortlink to an HTTPS URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change link format as discussed. Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/modules/geolocation/Geolocation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Geolocation On An Insecure Origin</title> 2 <title>Geolocation On An Insecure Origin</title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <!-- FIXME: We should extract the get_host_info() bits of this file out to somew here useful. --> 5 <!-- FIXME: We should extract the get_host_info() bits of this file out to somew here useful. -->
6 <script src="/serviceworker/resources/test-helpers.js"></script> 6 <script src="/serviceworker/resources/test-helpers.js"></script>
7 <script> 7 <script>
8 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { 8 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
9 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.p athname; 9 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.p athname;
10 } else { 10 } else {
11 if (window.testRunner) 11 if (window.testRunner)
12 testRunner.overridePreference("WebKitStrictPowerfulFeatureRestrictions", true); 12 testRunner.overridePreference("WebKitStrictPowerfulFeatureRestrictions", true);
13 13
14 async_test(function() { 14 async_test(function() {
15 navigator.geolocation.getCurrentPosition( 15 navigator.geolocation.getCurrentPosition(
16 this.step_func(function() { 16 this.step_func(function() {
17 assert_unreached('getCurrentPosition should fail, but succeeded. '); 17 assert_unreached('getCurrentPosition should fail, but succeeded. ');
18 this.done(); 18 this.done();
19 }), 19 }),
20 this.step_func(function(error) { 20 this.step_func(function(error) {
21 assert_equals(error.message, 'Only secure origins are allowed. h ttp://goo.gl/lq4gCo'); 21 assert_equals(error.message, 'Only secure origins are allowed (s ee: https://goo.gl/Y0ZkNV).');
22 this.done(); 22 this.done();
23 })); 23 }));
24 }, 'getCurrentPosition'); 24 }, 'getCurrentPosition');
25 25
26 async_test(function() { 26 async_test(function() {
27 navigator.geolocation.watchPosition( 27 navigator.geolocation.watchPosition(
28 this.step_func(function() { 28 this.step_func(function() {
29 assert_unreached('watchPosition should fail, but succeeded.'); 29 assert_unreached('watchPosition should fail, but succeeded.');
30 this.done(); 30 this.done();
31 }), 31 }),
32 this.step_func(function(error) { 32 this.step_func(function(error) {
33 assert_equals(error.message, 'Only secure origins are allowed. h ttp://goo.gl/lq4gCo'); 33 assert_equals(error.message, 'Only secure origins are allowed (s ee: https://goo.gl/Y0ZkNV).');
34 this.done(); 34 this.done();
35 })); 35 }));
36 }, 'watchPosition'); 36 }, 'watchPosition');
37 } 37 }
38 </script> 38 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/modules/geolocation/Geolocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698