Index: LayoutTests/http/tests/geofencing/resources/worker-service-not-available.js |
diff --git a/LayoutTests/http/tests/geofencing/resources/worker-service-not-available.js b/LayoutTests/http/tests/geofencing/resources/worker-service-not-available.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0f88dc17c38c8ae2696f334ab1555a0daa1a02a2 |
--- /dev/null |
+++ b/LayoutTests/http/tests/geofencing/resources/worker-service-not-available.js |
@@ -0,0 +1,25 @@ |
+importScripts('../../serviceworker/resources/worker-testharness.js'); |
+importScripts('../../resources/testharness-helpers.js'); |
+ |
+promise_test(function(test) { |
+ return assert_promise_rejects( |
+ navigator.geofencing.registerRegion( |
+ new CircularGeofencingRegion({latitude: 37.421999, |
+ longitude: -122.084015})), |
+ 'AbortError', |
+ 'registerRegion should fail with an AbortError'); |
+ }, 'registerRegion should fail'); |
+ |
+promise_test(function(test) { |
+ return assert_promise_rejects( |
+ navigator.geofencing.unregisterRegion(""), |
+ 'AbortError', |
+ 'unregisterRegion should fail with an AbortError'); |
+ }, 'unregisterRegion should fail'); |
+ |
+promise_test(function(test) { |
+ return assert_promise_rejects( |
+ navigator.geofencing.getRegisteredRegions(), |
+ 'AbortError', |
+ 'getRegisteredRegions should fail with an AbortError'); |
+ }, 'getRegisteredRegions should fail'); |