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

Unified Diff: chrome/test/data/push_messaging/push_test.js

Issue 1231613005: Hook up the Push API with GCM's new ability to own encryption keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-encryption
Patch Set: Created 5 years, 5 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 | « chrome/browser/services/gcm/gcm_profile_service.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/push_messaging/push_test.js
diff --git a/chrome/test/data/push_messaging/push_test.js b/chrome/test/data/push_messaging/push_test.js
index 607126f3c39f90a4e52a893ca43074459b353c94..6cc1785479defef57974568e70aed435e4588d4e 100644
--- a/chrome/test/data/push_messaging/push_test.js
+++ b/chrome/test/data/push_messaging/push_test.js
@@ -106,6 +106,16 @@ function subscribePush() {
}).catch(sendErrorToTest);
}
+function getCurve25519dh() {
+ navigator.serviceWorker.ready.then(function(swRegistration) {
+ return swRegistration.pushManager.getSubscription()
+ .then(function(subscription) {
+ sendResultToTest(btoa(String.fromCharCode.apply(null,
+ new Uint8Array(subscription.curve25519dh))));
+ });
+ }).catch(sendErrorToTest);
+}
+
function permissionState() {
navigator.serviceWorker.ready.then(function(swRegistration) {
return swRegistration.pushManager.permissionState(pushSubscriptionOptions)
« no previous file with comments | « chrome/browser/services/gcm/gcm_profile_service.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698