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

Unified Diff: LayoutTests/http/tests/push_messaging/get-subscription-in-service-worker.html

Issue 1148763005: Remove support for PushSubscription.subscriptionId. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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: LayoutTests/http/tests/push_messaging/get-subscription-in-service-worker.html
diff --git a/LayoutTests/http/tests/push_messaging/get-subscription-in-service-worker.html b/LayoutTests/http/tests/push_messaging/get-subscription-in-service-worker.html
index 78dfbd2e885947a6c45d6f8a04816085fb27077c..3a9c8cc77aa59d7f11bf0b8853350903d2080dcc 100644
--- a/LayoutTests/http/tests/push_messaging/get-subscription-in-service-worker.html
+++ b/LayoutTests/http/tests/push_messaging/get-subscription-in-service-worker.html
@@ -20,7 +20,7 @@ async_test(function(test) {
var scope = 'resources/scope/' + location.pathname;
var port;
var registration;
- var previousSubscriptionId;
+ var previousEndpoint;
getActiveServiceWorkerWithMessagePort(test, script, scope)
.then(function(workerInfo) {
@@ -32,22 +32,22 @@ async_test(function(test) {
return runCommandInServiceWorker(port, 'getSubscription');
})
.then(function(data) {
- assert_equals(data.subscriptionId, null,
+ assert_equals(data.endpoint, null,
'There must be no subscription after unsubscribing in the document.');
return runCommandInServiceWorker(port, 'subscribe');
})
.then(function(data) {
- previousSubscriptionId = data.subscriptionId;
+ previousEndpoint = data.endpoint;
return runCommandInServiceWorker(port, 'getSubscription');
})
.then(function(data) {
- assert_equals(data.subscriptionId, previousSubscriptionId,
- 'Both PushSubscription instances should have the same id.');
+ assert_equals(data.endpoint, previousEndpoint,
+ 'Both PushSubscription instances should have the same endpoint.');
return registration.pushManager.getSubscription();
})
.then(function(subscription) {
- assert_equals(subscription.subscriptionId, previousSubscriptionId,
- 'The ids for the PushSubscription instances from document and worker must match.');
+ assert_equals(subscription.endpoint, previousEndpoint,
+ 'The endpoints for the PushSubscription instances from document and worker must match.');
return runCommandInServiceWorker(port, 'unsubscribe');
})
.then(function(data) {
@@ -56,13 +56,12 @@ async_test(function(test) {
return runCommandInServiceWorker(port, 'getSubscription');
})
.then(function(data) {
- assert_equals(data.subscriptionId, null,
+ assert_equals(data.endpoint, null,
'There must be no subscription after unsubscribing in the service worker.');
return runCommandInServiceWorker(port, 'subscribe');
})
.then(function(data) {
- assert_equals(typeof data.subscriptionId, 'string',
- 'Subscribing again should succeed.');
+ assert_equals(typeof data.endpoint, 'string', 'Subscribing again should succeed.');
return registration.unregister();
})
.then(function(unregisterResult) {

Powered by Google App Engine
This is Rietveld 408576698