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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/permission-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/permission-service-connection-error.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/permission-service-connection-error.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/permission-service-connection-error.html
index 76d271661be5d59b18c77852d3ddf58ba23b3e7c..d4f7a3d8c9180c32cf09cbf9b13e143d6a7ae0f5 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/permission-service-connection-error.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/permission-service-connection-error.html
@@ -6,6 +6,27 @@
<script src="resources/geolocation-mock.js"></script>
</head>
<body>
-<script src="script-tests/permission-service-connection-error.js"></script>
+<script>
+description("Tests Geolocation when the permission service connection fails.");
+
+var error;
+
+geolocationServiceMock.then(mock => {
+
+ mock.rejectPermissionConnections();
+
+ navigator.geolocation.getCurrentPosition(function(p) {
+ testFailed('Success callback invoked unexpectedly');
+ finishJSTest();
+ }, function(e) {
+ error = e;
+ shouldBe('error.code', 'error.PERMISSION_DENIED');
+ shouldBe('error.message', '"User denied Geolocation"');
+ finishJSTest();
+ });
+});
+
+window.jsTestIsAsync = true;
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698