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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/geofencing/event_triggering.html

Issue 1972733002: Delete geofencing implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark histogram suffix as obsolete Created 4 years, 7 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/http/tests/geofencing/event_triggering.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/geofencing/event_triggering.html b/third_party/WebKit/LayoutTests/http/tests/geofencing/event_triggering.html
deleted file mode 100644
index 0e6d178f6b24dd38bcb85a3ff08fa359c9d6984f..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/geofencing/event_triggering.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<title>Tests registering regions and receiving events.</title>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../serviceworker/resources/test-helpers.js"></script>
-<script>
-var sw_url = 'resources/worker-passes-events-back.js';
-var sw_scope = 'resources/service-worker-scope' + window.location.pathname;
-
-test(function(test) {
- assert_true(window.testRunner instanceof Object);
- test.done();
- }, 'window.testRunner is required for the following tests.');
-
-testRunner.setGeofencingMockProvider(true);
-
-// Returns a promise that resolves to the first message received by |port|.
-// Removes any message event handlers that might exist on the |port|.
-function wait_for_reply(t, port) {
- return new Promise(function(resolve) {
- port.onmessage = t.step_func(function(event) {
- port.onmessage = null;
- resolve(event.data);
- });
- });
-}
-
-promise_test(function(test) {
- var registration;
- var port;
- return service_worker_unregister_and_register(test, sw_url, sw_scope)
- .then(test.step_func(function(r) {
- registration = r;
- return wait_for_state(test, r.installing, 'activated');
- })).then(test.step_func(function() {
- var channel = new MessageChannel();
- port = channel.port1;
- registration.active.postMessage({port: channel.port2}, [channel.port2]);
- return wait_for_reply(test, port);
- })).then(test.step_func(function(reply) {
- assert_equals(reply, 'setup');
- return registration.geofencing.registerRegion(
- new CircularGeofencingRegion({id: 'myid',
- latitude: 37.421999,
- longitude: -122.084015,
- radius: 10}));
- })).then(test.step_func(function() {
- testRunner.setGeofencingMockPosition(37.422, -122.084015);
- return wait_for_reply(test, port);
- })).then(test.step_func(function(reply) {
- assert_equals(reply.event, 'geofenceenter');
- assert_equals(reply.id, 'myid');
- testRunner.setGeofencingMockPosition(37.423, -122.084015);
- return wait_for_reply(test, port);
- })).then(test.step_func(function(reply) {
- assert_equals(reply.event, 'geofenceleave');
- assert_equals(reply.id, 'myid');
- return registration.geofencing.registerRegion(
- new CircularGeofencingRegion({id: 'bigregion',
- latitude: 37.421999,
- longitude: -122.084015,
- radius: 200}));
- })).then(test.step_func(function() {
- return wait_for_reply(test, port);
- })).then(test.step_func(function(reply) {
- assert_equals(reply.event, 'geofenceenter');
- assert_equals(reply.id, 'bigregion');
- return service_worker_unregister(test, sw_scope);
- }));
- }, 'Tests basic enter and leave events.');
-
-</script>
« no previous file with comments | « ipc/ipc_message_start.h ('k') | third_party/WebKit/LayoutTests/http/tests/geofencing/resources/emptyworker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698