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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-service-connection-error.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-service-connection-error.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-service-connection-error.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-service-connection-error.html
index 35d65c5646907a46dcc40680abfe129fd08d717b..7c242b68691633d666a60d49b72d44c8c6017ddf 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-service-connection-error.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-service-connection-error.html
@@ -4,8 +4,29 @@
<script src="../../../resources/js-test.js"></script>
<script src="../../../resources/mojo-helpers.js"></script>
<script src="resources/geolocation-mock.js"></script>
-<script src="script-tests/error-service-connection-error.js"></script>
</head>
<body>
+<script>
+description("Tests Geolocation when the geolocation service connection fails.");
+
+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;
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698