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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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
(Empty)
1 description("Tests Geolocation error callback using the mock service.");
2
3 var mockMessage = "debug";
4
5 var error;
6
7 geolocationServiceMock.then(mock => {
8 mock.setGeolocationPermission(true);
9 mock.setGeolocationPositionUnavailableError(mockMessage);
10
11 navigator.geolocation.getCurrentPosition(function(p) {
12 testFailed('Success callback invoked unexpectedly');
13 finishJSTest();
14 }, function(e) {
15 error = e;
16 shouldBe('error.code', 'error.POSITION_UNAVAILABLE');
17 shouldBe('error.message', 'mockMessage');
18 shouldBe('error.UNKNOWN_ERROR', 'undefined');
19 shouldBe('error.PERMISSION_DENIED', '1');
20 shouldBe('error.POSITION_UNAVAILABLE', '2');
21 shouldBe('error.TIMEOUT', '3');
22 finishJSTest();
23 });
24 });
25
26 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698