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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-permission-denied.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 due to a PERMISSION_DENIED error are OK."); 1 description("Tests that reentrant calls to Geolocation methods from the error ca llback due to a PERMISSION_DENIED error are OK.");
2 2
3 if (!window.testRunner || !window.mojo)
4 debug('This test can not run without testRunner or mojo');
5
6 var error; 3 var error;
7 4
8 geolocationServiceMock.then(mock => { 5 geolocationServiceMock.then(mock => {
9 mock.setGeolocationPermission(false); 6 mock.setGeolocationPermission(false);
10 mock.setGeolocationPosition(51.478, -0.166, 100.0); 7 mock.setGeolocationPosition(51.478, -0.166, 100.0);
11 8
12 function checkPermissionError(e) { 9 function checkPermissionError(e) {
13 error = e; 10 error = e;
14 shouldBe('error.code', 'error.PERMISSION_DENIED'); 11 shouldBe('error.code', 'error.PERMISSION_DENIED');
15 shouldBe('error.message', '"User denied Geolocation"'); 12 shouldBe('error.message', '"User denied Geolocation"');
(...skipping 18 matching lines...) Expand all
34 testFailed('Success callback invoked unexpectedly'); 31 testFailed('Success callback invoked unexpectedly');
35 finishJSTest(); 32 finishJSTest();
36 }, function(e) { 33 }, function(e) {
37 checkPermissionError(e); 34 checkPermissionError(e);
38 finishJSTest(); 35 finishJSTest();
39 }); 36 });
40 } 37 }
41 }); 38 });
42 39
43 window.jsTestIsAsync = true; 40 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698