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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-stops-watches.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 is denied, watches are stopp ed, as well as one-shots."); 1 description("Tests that when Geolocation permission is denied, watches are stopp ed, as well as one-shots.");
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 // Configure the mock Geolocation service to report a position to cause perm ission 7 // Configure the mock Geolocation service to report a position to cause perm ission
11 // to be requested, then deny it. 8 // to be requested, then deny it.
12 mock.setGeolocationPermission(false); 9 mock.setGeolocationPermission(false);
13 mock.setGeolocationPosition(51.478, -0.166, 100.0); 10 mock.setGeolocationPosition(51.478, -0.166, 100.0);
14 11
15 var errorCallbackInvoked = false; 12 var errorCallbackInvoked = false;
(...skipping 12 matching lines...) Expand all
28 shouldBe('error.message', '"User denied Geolocation"'); 25 shouldBe('error.message', '"User denied Geolocation"');
29 26
30 // Update the mock Geolocation service to report a new position, then 27 // Update the mock Geolocation service to report a new position, then
31 // yield to allow a chance for the success callback to be invoked. 28 // yield to allow a chance for the success callback to be invoked.
32 mock.setGeolocationPosition(55.478, -0.166, 100); 29 mock.setGeolocationPosition(55.478, -0.166, 100);
33 window.setTimeout(finishJSTest, 0); 30 window.setTimeout(finishJSTest, 0);
34 }); 31 });
35 }); 32 });
36 33
37 window.jsTestIsAsync = true; 34 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698