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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-clear-watch.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 watchPosition, and the watch is cleared in the error callback, there is n o crash. This a regression test for https://bugs.webkit.org/show_bug.cgi?id=3211 1."); 1 description("Tests that when Geolocation permission has been denied prior to a c all to watchPosition, and the watch is cleared in the error callback, there is n o crash. This a regression test for https://bugs.webkit.org/show_bug.cgi?id=3211 1.");
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 16 matching lines...) Expand all
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 navigator.geolocation.clearWatch(watchId); 32 navigator.geolocation.clearWatch(watchId);
36 window.setTimeout(finishJSTest, 0); 33 window.setTimeout(finishJSTest, 0);
37 }); 34 });
38 } 35 }
39 }); 36 });
40 37
41 window.jsTestIsAsync = true; 38 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698