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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/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 Geolocation when permission is denied, using the mock service ."); 1 description("Tests Geolocation when permission is denied, using the mock service .");
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 6
10 mock.setGeolocationPermission(false); 7 mock.setGeolocationPermission(false);
11 mock.setGeolocationPosition(51.478, -0.166, 100.0); 8 mock.setGeolocationPosition(51.478, -0.166, 100.0);
12 9
13 navigator.geolocation.getCurrentPosition(function(p) { 10 navigator.geolocation.getCurrentPosition(function(p) {
14 testFailed('Success callback invoked unexpectedly'); 11 testFailed('Success callback invoked unexpectedly');
15 finishJSTest(); 12 finishJSTest();
16 }, function(e) { 13 }, function(e) {
17 error = e; 14 error = e;
18 shouldBe('error.code', 'error.PERMISSION_DENIED'); 15 shouldBe('error.code', 'error.PERMISSION_DENIED');
19 shouldBe('error.message', '"User denied Geolocation"'); 16 shouldBe('error.message', '"User denied Geolocation"');
20 finishJSTest(); 17 finishJSTest();
21 }); 18 });
22 }); 19 });
23 20
24 window.jsTestIsAsync = true; 21 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698