OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html manifest="/security/powerfulFeatureRestrictions/resources/simple.manifest"
> | 2 <html manifest="/security/powerfulFeatureRestrictions/resources/simple.manifest"
> |
3 <head> | 3 <head> |
4 <title>Old Powerful Features on an Insecure Origin</title> | 4 <title>Old Powerful Features on an Insecure Origin</title> |
5 </head> | 5 </head> |
6 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
7 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
8 <script src="/resources/get-host-info.js"></script> | 8 <script src="/resources/get-host-info.js"></script> |
9 | 9 |
10 <body> | 10 <body> |
11 <div id="target"></div> | 11 <div id="target"></div> |
12 <script> | 12 <script> |
13 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { | 13 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
14 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.p
athname; | 14 window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.p
athname; |
15 } else { | 15 } else { |
16 if (!window.internals) | 16 if (!window.internals) |
17 assert_unreached('window.internals is required for this test'); | 17 assert_unreached('window.internals is required for this test'); |
18 | 18 |
19 var mockLatitude = 51.478; | |
20 var mockLongitude = -0.166; | |
21 var mockAccuracy = 100.0; | |
22 | |
23 internals.setGeolocationClientMock(document); | |
24 internals.setGeolocationPermission(document, true); | |
25 internals.setGeolocationPosition(document, | |
26 mockLatitude, | |
27 mockLongitude, | |
28 mockAccuracy); | |
29 | 19 |
30 // Tests for APIs that are deprecated, but still allowed, on | 20 // Tests for APIs that are deprecated, but still allowed, on |
31 // insecure origins | 21 // insecure origins |
32 async_test(function() { | 22 async_test(function() { |
33 testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0, | 23 testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0, |
34 true, 0, true, 0, true, 0, | 24 true, 0, true, 0, true, 0, |
35 true, 0, true, 0, true, 0, | 25 true, 0, true, 0, true, 0, |
36 0); | 26 0); |
37 window.addEventListener('devicemotion', this.step_func_done()); | 27 window.addEventListener('devicemotion', this.step_func_done()); |
38 }, 'device motion'); | 28 }, 'device motion'); |
(...skipping 54 matching lines...) Loading... |
93 })) | 83 })) |
94 .catch(this.unreached_func("fetch() for cachable resource unexpe
ctedly failed")); | 84 .catch(this.unreached_func("fetch() for cachable resource unexpe
ctedly failed")); |
95 }); | 85 }); |
96 | 86 |
97 applicationCache.addEventListener('cached', cached, false); | 87 applicationCache.addEventListener('cached', cached, false); |
98 }, 'appcache'); | 88 }, 'appcache'); |
99 } | 89 } |
100 </script> | 90 </script> |
101 </body> | 91 </body> |
102 </html> | 92 </html> |
OLD | NEW |