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

Unified Diff: LayoutTests/http/tests/push_messaging/get_registration.html

Issue 841333002: Push API: rename registration to subscription. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use https in the spec link. Created 5 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/push_messaging/get_subscription.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/push_messaging/get_registration.html
diff --git a/LayoutTests/http/tests/push_messaging/get_registration.html b/LayoutTests/http/tests/push_messaging/get_registration.html
deleted file mode 100644
index d3eae6caf22512fdd3557a1f9b2f9827b3601d3d..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/push_messaging/get_registration.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Test PushManager.getRegistration()</title>
-<link rel="manifest" href="resources/push_manifest.json">
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../serviceworker/resources/test-helpers.js"></script>
-</head>
-<body>
-<script>
-async_test(function(test) {
- var workerUrl = 'resources/empty_worker.js';
- var workerScope = 'resources/scope/' + location.pathname;
- var swRegistration = null;
- service_worker_unregister_and_register(test, workerUrl, workerScope)
- .then(function(serviceWorkerRegistration) {
- swRegistration = serviceWorkerRegistration;
- return wait_for_state(test, swRegistration.installing, 'activated');
- })
- .then(function() {
- // If running manually, grant permission when prompted.
- if (self.testRunner)
- testRunner.setPushMessagingPermission(location.origin, true);
-
- assert_inherits(swRegistration.pushManager, 'getRegistration',
- 'getRegistration() should be exposed on the PushManager object');
- assert_equals(typeof(swRegistration.pushManager.getRegistration), 'function',
- 'PushManager.getRegistration() is a function.');
-
- return swRegistration.pushManager.getRegistration();
- })
- .then(function(pushRegistration) {
- assert_equals(pushRegistration, null,
- "pushRegistration should be null if there is no active push registration.")
- return swRegistration.pushManager.register();
- })
- .then(function(pushRegistration) {
- previousPushRegistration = pushRegistration;
- return swRegistration.pushManager.getRegistration();
- })
- .then(function(pushRegistration) {
- assert_equals(previousPushRegistration.endPoint, pushRegistration.endPoint,
- "Both registration objects should have the same endpoint.");
- assert_equals(previousPushRegistration.registrationId, pushRegistration.registrationId,
- "Both registration objects should have the same registration id.");
- return pushRegistration.unregister();
- })
- .then(function(unregistered) {
- assert_true(unregistered, "unregistration was successful");
- return swRegistration.pushManager.getRegistration();
- })
- .then(function(pushRegistration) {
- assert_equals(pushRegistration, null,
- "pushRegistration should be null after unregistering.")
- return swRegistration.pushManager.register();
- })
- .then(function(pushRegistration) {
- assert_not_equals(pushRegistration, null,
- "Registration should have succeeded.");
- return service_worker_unregister(test, workerScope);
- })
- .then(function() {
- return swRegistration.pushManager.getRegistration();
- })
- .then(function(pushRegistration) {
- assert_equals(pushRegistration, null,
- "After unregistration from SW, there should be no registration.");
- return service_worker_unregister_and_done(test, workerScope);
- })
- .catch(unreached_rejection(test));
-});
-</script>
-</body>
-</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/push_messaging/get_subscription.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698