Chromium Code Reviews| Index: LayoutTests/inspector/geolocation-emulation-tests.html |
| diff --git a/LayoutTests/inspector/geolocation-emulation-tests.html b/LayoutTests/inspector/geolocation-emulation-tests.html |
| index 778862c11b4b214b0478dcf8f7ee86eef447142c..08f9455c9d20c25cca205d92cd143d0d85dd3e15 100644 |
| --- a/LayoutTests/inspector/geolocation-emulation-tests.html |
| +++ b/LayoutTests/inspector/geolocation-emulation-tests.html |
| @@ -1,8 +1,15 @@ |
| <html> |
| <head> |
| <script src="../http/tests/inspector/inspector-test.js"></script> |
| +<script src="../resources/permissions-helper.js"></script> |
| <script> |
| +function grantGeolocationPermission() { |
|
whywhat
2015/09/16 15:05:22
you also need to update the expected results for t
|
| + PermissionsHelper.setPermission('geolocation', 'granted').then(function(p) { |
| + console.log("Permission granted."); |
| + }); |
| +} |
| + |
| function serializeGeolocationError(error) { |
| var result = "Unknown error" |
| switch (error.code) |
| @@ -60,10 +67,13 @@ function overridenTimestampGeolocation() |
| function test() |
| { |
| - if (window.testRunner) |
| - window.testRunner.setPermission('geolocation', 'granted', location.origin, location.origin); |
| - |
| InspectorTest.runTestSuite([ |
| + function testPermissionGranted(next) |
| + { |
| + InspectorTest.addConsoleSniffer(next); |
| + InspectorTest.evaluateInPage("grantGeolocationPermission()"); |
| + }, |
| + |
| function testGeolocationUnavailable(next) |
| { |
| InspectorTest.EmulationAgent.setGeolocationOverride(); |