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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js

Issue 2642873002: Moves mojo.define -> gin.define. (Closed)
Patch Set: rebaseline Created 3 years, 11 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 description("Tests that when an exception is thrown in the success callback, the error callback is not invoked. Note that this test throws an exception which is not caught."); 1 description("Tests that when an exception is thrown in the success callback, the error callback is not invoked. Note that this test throws an exception which is not caught.");
2 2
3 var mockLatitude = 51.478; 3 var mockLatitude = 51.478;
4 var mockLongitude = -0.166; 4 var mockLongitude = -0.166;
5 var mockAccuracy = 100; 5 var mockAccuracy = 100;
6 6
7 if (!window.testRunner || !window.mojo)
8 debug('This test can not run without testRunner or mojo');
9
10 var position; 7 var position;
11 8
12 geolocationServiceMock.then(mock => { 9 geolocationServiceMock.then(mock => {
13 mock.setGeolocationPermission(true); 10 mock.setGeolocationPermission(true);
14 mock.setGeolocationPosition(mockLatitude, 11 mock.setGeolocationPosition(mockLatitude,
15 mockLongitude, 12 mockLongitude,
16 mockAccuracy); 13 mockAccuracy);
17 navigator.geolocation.getCurrentPosition(function(p) { 14 navigator.geolocation.getCurrentPosition(function(p) {
18 position = p; 15 position = p;
19 shouldBe('position.coords.latitude', 'mockLatitude'); 16 shouldBe('position.coords.latitude', 'mockLatitude');
(...skipping 12 matching lines...) Expand all
32 }); 29 });
33 }); 30 });
34 31
35 function assertWeGotException() 32 function assertWeGotException()
36 { 33 {
37 shouldHaveHadError(); 34 shouldHaveHadError();
38 finishJSTest(); 35 finishJSTest();
39 } 36 }
40 37
41 window.jsTestIsAsync = true; 38 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698