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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-error.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 reentrant calls to Geolocation methods from the error ca llback are OK."); 1 description("Tests that reentrant calls to Geolocation methods from the error ca llback are OK.");
2 2
3 var mockMessage = 'test'; 3 var mockMessage = 'test';
4 4
5 if (!window.testRunner || !window.mojo)
6 debug('This test can not run without testRunner or mojo');
7
8 var error; 5 var error;
9 6
10 geolocationServiceMock.then(mock => { 7 geolocationServiceMock.then(mock => {
11 mock.setGeolocationPermission(true); 8 mock.setGeolocationPermission(true);
12 mock.setGeolocationPositionUnavailableError(mockMessage); 9 mock.setGeolocationPositionUnavailableError(mockMessage);
13 10
14 var errorCallbackInvoked = false; 11 var errorCallbackInvoked = false;
15 navigator.geolocation.getCurrentPosition(function(p) { 12 navigator.geolocation.getCurrentPosition(function(p) {
16 testFailed('Success callback invoked unexpectedly'); 13 testFailed('Success callback invoked unexpectedly');
17 finishJSTest(); 14 finishJSTest();
(...skipping 22 matching lines...) Expand all
40 }, function(e) { 37 }, function(e) {
41 error = e; 38 error = e;
42 shouldBe('error.code', 'error.POSITION_UNAVAILABLE'); 39 shouldBe('error.code', 'error.POSITION_UNAVAILABLE');
43 shouldBe('error.message', 'mockMessage'); 40 shouldBe('error.message', 'mockMessage');
44 finishJSTest(); 41 finishJSTest();
45 }); 42 });
46 } 43 }
47 }); 44 });
48 45
49 window.jsTestIsAsync = true; 46 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698