| Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..051273d169ee75d57f68cedf4e20b29ff667dac1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js
|
| @@ -0,0 +1,25 @@
|
| +description("Tests Geolocation when the permission service connection fails.");
|
| +
|
| +if (!window.testRunner || !window.mojo)
|
| + debug('This test can not run without testRunner or mojo');
|
| +
|
| +var error;
|
| +
|
| +geolocationServiceMock.then(mock => {
|
| +
|
| + mock.rejectPermissionConnections();
|
| + mock.setGeolocationPermission(false);
|
| + mock.setGeolocationPosition(51.478, -0.166, 100.0);
|
| +
|
| + navigator.geolocation.getCurrentPosition(function(p) {
|
| + testFailed('Success callback invoked unexpectedly');
|
| + finishJSTest();
|
| + }, function(e) {
|
| + error = e;
|
| + shouldBe('error.code', 'error.PERMISSION_DENIED');
|
| + shouldBe('error.message', '"User denied Geolocation"');
|
| + finishJSTest();
|
| + });
|
| +});
|
| +
|
| +window.jsTestIsAsync = true;
|
|
|