Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Geolocation / script-tests / timeout-over-max-of-unsigned.js
blobe934d3ad85ce2de79b2bbfac4a6693063038b1fa
1 description("Tests that when timeout value is over maximum of unsigned, the success callback is called as expected.");
3 var mockLatitude = 51.478;
4 var mockLongitude = -0.166;
5 var mockAccuracy = 100.0;
7 if (!window.testRunner || !window.internals)
8     debug('This test can not run without testRunner or internals');
10 internals.setGeolocationClientMock(document);
11 internals.setGeolocationPermission(document, true);
12 internals.setGeolocationPosition(document,
13                                  mockLatitude,
14                                  mockLongitude,
15                                  mockAccuracy);
17 var position;
18 navigator.geolocation.getCurrentPosition(function(p) {
19     position = p;
20     shouldBe('position.coords.latitude', 'mockLatitude');
21     shouldBe('position.coords.longitude', 'mockLongitude');
22     shouldBe('position.coords.accuracy', 'mockAccuracy');
23     finishJSTest();
24 }, function(e) {
25     testFailed('Error callback invoked unexpectedly');
26     finishJSTest();
27 }, {
28     timeout: 4294967296
29 });
31 window.jsTestIsAsync = true;