Index: LayoutTests/http/tests/push_messaging/subscribe_success.html |
diff --git a/LayoutTests/http/tests/push_messaging/register_success.html b/LayoutTests/http/tests/push_messaging/subscribe_success.html |
similarity index 67% |
rename from LayoutTests/http/tests/push_messaging/register_success.html |
rename to LayoutTests/http/tests/push_messaging/subscribe_success.html |
index 9520fb01cbe6a45fe026c678366950c8919d6d2c..196e6c4803369a3ba095fc47d46425643954b945 100644 |
--- a/LayoutTests/http/tests/push_messaging/register_success.html |
+++ b/LayoutTests/http/tests/push_messaging/subscribe_success.html |
@@ -1,7 +1,7 @@ |
<!DOCTYPE html> |
<html> |
<head> |
-<title>register() succeeds when permission is granted and resolves with a valid registration</title> |
+<title>subscribe() succeeds when permission is granted and resolves with a valid subscription</title> |
<link rel="manifest" href="resources/push_manifest.json"> |
<script src="../resources/testharness.js"></script> |
<script src="../resources/testharnessreport.js"></script> |
@@ -22,16 +22,16 @@ async_test(function(test) { |
// If running manually, grant permission when prompted. |
if (self.testRunner) |
testRunner.setPushMessagingPermission(location.origin, true); |
- return swRegistration.pushManager.register(); |
+ return swRegistration.pushManager.subscribe(); |
}) |
- .then(function(pushRegistration) { |
- assert_own_property(pushRegistration, 'registrationId'); |
- assert_equals(typeof pushRegistration.registrationId, 'string'); |
+ .then(function(pushSubscription) { |
+ assert_own_property(pushSubscription, 'subscriptionId'); |
+ assert_equals(typeof pushSubscription.subscriptionId, 'string'); |
- assert_own_property(pushRegistration, 'endpoint'); |
- assert_equals(typeof pushRegistration.endpoint, 'string'); |
+ assert_own_property(pushSubscription, 'endpoint'); |
+ assert_equals(typeof pushSubscription.endpoint, 'string'); |
try { |
- var endpointUrl = new URL(pushRegistration.endpoint); |
+ var endpointUrl = new URL(pushSubscription.endpoint); |
} catch(e) { |
assert_unreached('Constructing a URL from the endpoint should not throw.'); |
} |
@@ -39,7 +39,7 @@ async_test(function(test) { |
return service_worker_unregister_and_done(test, workerScope); |
}) |
.catch(unreached_rejection(test)); |
-}, 'register() succeeds when permission is granted and resolves with a valid registration'); |
+}, 'subscribe() succeeds when permission is granted and resolves with a valid subscription'); |
</script> |
</body> |
</html> |