| Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js
|
| index e934d3ad85ce2de79b2bbfac4a6693063038b1fa..5e5e72d7ccaa307a7f014606c94d6cced8d776c7 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js
|
| @@ -4,28 +4,29 @@ var mockLatitude = 51.478;
|
| var mockLongitude = -0.166;
|
| var mockAccuracy = 100.0;
|
|
|
| -if (!window.testRunner || !window.internals)
|
| - debug('This test can not run without testRunner or internals');
|
| -
|
| -internals.setGeolocationClientMock(document);
|
| -internals.setGeolocationPermission(document, true);
|
| -internals.setGeolocationPosition(document,
|
| - mockLatitude,
|
| - mockLongitude,
|
| - mockAccuracy);
|
| +if (!window.testRunner || !window.mojo)
|
| + debug('This test can not run without testRunner or mojo');
|
|
|
| var position;
|
| -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();
|
| -}, {
|
| - timeout: 4294967296
|
| +
|
| +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();
|
| + }, {
|
| + timeout: 4294967296
|
| + });
|
| });
|
|
|
| window.jsTestIsAsync = true;
|
|
|