Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/timeout-over-max-of-unsigned.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../../resources/mojo-helpers.js"></script>
6 <script src="resources/geolocation-mock.js"></script>
7 </head>
8 <body>
9 <script>
1 description("Tests that when timeout value is over maximum of unsigned, the succ ess callback is called as expected."); 10 description("Tests that when timeout value is over maximum of unsigned, the succ ess callback is called as expected.");
2 11
3 var mockLatitude = 51.478; 12 var mockLatitude = 51.478;
4 var mockLongitude = -0.166; 13 var mockLongitude = -0.166;
5 var mockAccuracy = 100.0; 14 var mockAccuracy = 100.0;
6 15
7 var position; 16 var position;
8 17
9 geolocationServiceMock.then(mock => { 18 geolocationServiceMock.then(mock => {
10 mock.setGeolocationPermission(true); 19 mock.setGeolocationPermission(true);
11 mock.setGeolocationPosition(mockLatitude, 20 mock.setGeolocationPosition(mockLatitude,
12 mockLongitude, 21 mockLongitude,
13 mockAccuracy); 22 mockAccuracy);
14 23
15 navigator.geolocation.getCurrentPosition(function(p) { 24 navigator.geolocation.getCurrentPosition(function(p) {
16 position = p; 25 position = p;
17 shouldBe('position.coords.latitude', 'mockLatitude'); 26 shouldBe('position.coords.latitude', 'mockLatitude');
18 shouldBe('position.coords.longitude', 'mockLongitude'); 27 shouldBe('position.coords.longitude', 'mockLongitude');
19 shouldBe('position.coords.accuracy', 'mockAccuracy'); 28 shouldBe('position.coords.accuracy', 'mockAccuracy');
20 finishJSTest(); 29 finishJSTest();
21 }, function(e) { 30 }, function(e) {
22 testFailed('Error callback invoked unexpectedly'); 31 testFailed('Error callback invoked unexpectedly');
23 finishJSTest(); 32 finishJSTest();
24 }, { 33 }, {
25 timeout: 4294967296 34 timeout: 4294967296
26 }); 35 });
27 }); 36 });
28 37
29 window.jsTestIsAsync = true; 38 window.jsTestIsAsync = true;
39 </script>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698