Index: LayoutTests/http/tests/geofencing/apis_not_implemented.html |
diff --git a/LayoutTests/http/tests/geofencing/apis_not_implemented.html b/LayoutTests/http/tests/geofencing/apis_not_implemented.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5ed7185a633dca85229940b08d79d809237a7981 |
--- /dev/null |
+++ b/LayoutTests/http/tests/geofencing/apis_not_implemented.html |
@@ -0,0 +1,43 @@ |
+<!DOCTYPE html> |
+<title>Tests that all geofencing methods exposed on a service worker registration always reject.</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script src="../resources/testharness-helpers.js"></script> |
+<script src="../serviceworker/resources/test-helpers.js"></script> |
+<script> |
+var sw_url = 'resources/emptyworker.js'; |
+var sw_scope = '/service-worker-scope' + window.location.pathname; |
+ |
+promise_test(function(test) { |
+ return assert_promise_rejects( |
+ service_worker_unregister_and_register(test, sw_url, sw_scope + '/register') |
+ .then(function(r) { |
+ return r.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( |
+ service_worker_unregister_and_register(test, sw_url, sw_scope + '/unregister') |
+ .then(function(r) { |
+ return r.geofencing.unregisterRegion(''); |
jsbell
2014/10/14 17:19:23
nit: 2 more spaces.
Marijn Kruisselbrink
2014/10/14 18:21:07
Done.
|
+ }), |
+ 'AbortError', |
+ 'unregisterRegion should fail with an AbortError'); |
+ }, 'unregisterRegion should fail'); |
+ |
+promise_test(function(test) { |
+ return assert_promise_rejects( |
+ service_worker_unregister_and_register(test, sw_url, sw_scope + '/getregions') |
+ .then(function(r) { |
+ return r.geofencing.getRegisteredRegions(); |
michaeln
2014/10/14 01:16:15
indent here doesn't match the indent on line 15, i
jsbell
2014/10/14 17:19:23
Should be 4. 2 from wrapping the contents of `then
Marijn Kruisselbrink
2014/10/14 18:21:07
Done.
|
+ }), |
+ 'AbortError', |
+ 'getRegisteredRegions should fail with an AbortError'); |
+ }, 'getRegisteredRegions should fail'); |
+ |
+</script> |