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

Unified Diff: LayoutTests/http/tests/geofencing/apis_not_implemented.html

Issue 623813002: Blink side of exposing the service worker registration associated with geofencing API calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: hopefully correctly fix compile Created 6 years, 2 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: 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..2fdba5a9ab7698e73bd072c15bb52f3da3258cb6
--- /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('');
+ }),
+ '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();
+ }),
+ 'AbortError',
+ 'getRegisteredRegions should fail with an AbortError');
+ }, 'getRegisteredRegions should fail');
+
+</script>
« no previous file with comments | « LayoutTests/geofencing/geofencing-not-implemented.html ('k') | LayoutTests/http/tests/geofencing/resources/emptyworker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698