| Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/timeout-negative.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/timeout-negative.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/timeout-negative.html
|
| index 77b531eedd9a64018de72bf6d462e3e07c10fe5e..aa89d2c70f634122d8d58ad5d1a9c5a7ed5a23e6 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/timeout-negative.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/timeout-negative.html
|
| @@ -6,6 +6,29 @@
|
| <script src="resources/geolocation-mock.js"></script>
|
| </head>
|
| <body>
|
| -<script src="script-tests/timeout-negative.js"></script>
|
| +<script>
|
| +description("Tests that when timeout is negative (and maximumAge is too), the error callback is called immediately with code TIMEOUT.");
|
| +
|
| +var error;
|
| +
|
| +geolocationServiceMock.then(mock => {
|
| + 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.TIMEOUT');
|
| + shouldBe('error.message', '"Timeout expired"');
|
| + finishJSTest();
|
| + }, {
|
| + timeout: -1000
|
| + });
|
| +});
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +</script>
|
| </body>
|
| </html>
|
|
|