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