| Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/success.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success.html
|
| index d65f5cc8189e2e9e2daa2e54c38b8d3f7e6c1c24..2f3f8547add2beb4dfb24c461db4f98f6a007074 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success.html
|
| @@ -6,6 +6,34 @@
|
| <script src="resources/geolocation-mock.js"></script>
|
| </head>
|
| <body>
|
| -<script src="script-tests/success.js"></script>
|
| +<script>
|
| +description("Tests Geolocation success callback using the mock service.");
|
| +
|
| +var mockLatitude = 51.478;
|
| +var mockLongitude = -0.166;
|
| +var mockAccuracy = 100;
|
| +
|
| +var position;
|
| +
|
| +geolocationServiceMock.then(mock => {
|
| + mock.setGeolocationPermission(true);
|
| + mock.setGeolocationPosition(mockLatitude,
|
| + mockLongitude,
|
| + mockAccuracy);
|
| +
|
| + navigator.geolocation.getCurrentPosition(function(p) {
|
| + position = p;
|
| + shouldBe('position.coords.latitude', 'mockLatitude');
|
| + shouldBe('position.coords.longitude', 'mockLongitude');
|
| + shouldBe('position.coords.accuracy', 'mockAccuracy');
|
| + finishJSTest();
|
| + }, function(e) {
|
| + testFailed('Error callback invoked unexpectedly');
|
| + finishJSTest();
|
| + });
|
| +});
|
| +
|
| +window.jsTestIsAsync = true;
|
| +</script>
|
| </body>
|
| </html>
|
|
|