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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js

Issue 1367853002: Move GeolocationDispatcher into blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..a5f070a38b3b65a6dd1d85168cf5aac927b06cef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js
@@ -0,0 +1,23 @@
+description("Tests Geolocation when the geolocation service connection fails.");
+
+if (!window.testRunner || !window.mojo)
+ debug('This test can not run without testRunner or mojo');
+
+var error;
+
+geolocationServiceMock.then(mock => {
+ mock.setGeolocationPermission(true);
+ mock.rejectGeolocationConnections();
+
+ navigator.geolocation.getCurrentPosition(function(p) {
+ testFailed('Success callback invoked unexpectedly');
+ finishJSTest();
+ }, function(e) {
+ error = e;
+ shouldBe('error.code', 'error.POSITION_UNAVAILABLE');
+ shouldBe('error.message', '"Failed to start Geolocation service"');
+ finishJSTest();
+ });
+});
+
+window.jsTestIsAsync = true;

Powered by Google App Engine
This is Rietveld 408576698