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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-success.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 Geolocation permission has been denied prior to a c all to a Geolocation method, the error callback is invoked with code PERMISSION_ DENIED, when the Geolocation service has a good position."); 1 description("Tests that when Geolocation permission has been denied prior to a c all to a Geolocation method, the error callback is invoked with code PERMISSION_ DENIED, when the Geolocation service has a good position.");
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 // Prime the Geolocation instance by denying permission. 7 // Prime the Geolocation instance by denying permission.
11 mock.setGeolocationPermission(false); 8 mock.setGeolocationPermission(false);
12 mock.setGeolocationPosition(51.478, -0.166, 100); 9 mock.setGeolocationPosition(51.478, -0.166, 100);
13 10
14 navigator.geolocation.getCurrentPosition(function(p) { 11 navigator.geolocation.getCurrentPosition(function(p) {
15 testFailed('Success callback invoked unexpectedly'); 12 testFailed('Success callback invoked unexpectedly');
(...skipping 15 matching lines...) Expand all
31 }, function(e) { 28 }, function(e) {
32 error = e; 29 error = e;
33 shouldBe('error.code', 'error.PERMISSION_DENIED'); 30 shouldBe('error.code', 'error.PERMISSION_DENIED');
34 shouldBe('error.message', '"User denied Geolocation"'); 31 shouldBe('error.message', '"User denied Geolocation"');
35 finishJSTest(); 32 finishJSTest();
36 }); 33 });
37 } 34 }
38 }); 35 });
39 36
40 window.jsTestIsAsync = true; 37 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698