| Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/error.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error.html
|
| index f7f63ea753637bd5e990f0e187e0742d23c9d8ec..d7486231fc1d84939d95af60de830fabd8f2b041 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error.html
|
| @@ -4,8 +4,35 @@
|
| <script src="../../../resources/js-test.js"></script>
|
| <script src="../../../resources/mojo-helpers.js"></script>
|
| <script src="resources/geolocation-mock.js"></script>
|
| -<script src="script-tests/error.js"></script>
|
| </head>
|
| <body>
|
| +<script>
|
| +description("Tests Geolocation error callback using the mock service.");
|
| +
|
| +var mockMessage = "debug";
|
| +
|
| +var error;
|
| +
|
| +geolocationServiceMock.then(mock => {
|
| + mock.setGeolocationPermission(true);
|
| + mock.setGeolocationPositionUnavailableError(mockMessage);
|
| +
|
| + navigator.geolocation.getCurrentPosition(function(p) {
|
| + testFailed('Success callback invoked unexpectedly');
|
| + finishJSTest();
|
| + }, function(e) {
|
| + error = e;
|
| + shouldBe('error.code', 'error.POSITION_UNAVAILABLE');
|
| + shouldBe('error.message', 'mockMessage');
|
| + shouldBe('error.UNKNOWN_ERROR', 'undefined');
|
| + shouldBe('error.PERMISSION_DENIED', '1');
|
| + shouldBe('error.POSITION_UNAVAILABLE', '2');
|
| + shouldBe('error.TIMEOUT', '3');
|
| + finishJSTest();
|
| + });
|
| +});
|
| +
|
| +window.jsTestIsAsync = true;
|
| +</script>
|
| </body>
|
| </html>
|
|
|