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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/error.html

Issue 2671933003: Move Geolocation out from 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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../../resources/mojo-helpers.js"></script>
6 <script src="resources/geolocation-mock.js"></script>
7 </head>
8 <body>
9 <script>
10 description("Tests Geolocation error callback using the mock service.");
11
12 var mockMessage = "debug";
13
14 var error;
15
16 geolocationServiceMock.then(mock => {
17 mock.setGeolocationPermission(true);
18 mock.setGeolocationPositionUnavailableError(mockMessage);
19
20 navigator.geolocation.getCurrentPosition(function(p) {
21 testFailed('Success callback invoked unexpectedly');
22 finishJSTest();
23 }, function(e) {
24 error = e;
25 shouldBe('error.code', 'error.POSITION_UNAVAILABLE');
26 shouldBe('error.message', 'mockMessage');
27 shouldBe('error.UNKNOWN_ERROR', 'undefined');
28 shouldBe('error.PERMISSION_DENIED', '1');
29 shouldBe('error.POSITION_UNAVAILABLE', '2');
30 shouldBe('error.TIMEOUT', '3');
31 finishJSTest();
32 });
33 });
34
35 window.jsTestIsAsync = true;
36 </script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698