Chromium Code Reviews| 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 73907ba5f1124e4b56e410bb4b720a00c39f1463..7837ab7e0d1f105b2c1ea10444b1e1c6690567bb 100644 |
| --- a/chrome/test/data/push_messaging/push_test.js |
| +++ b/chrome/test/data/push_messaging/push_test.js |
| @@ -8,10 +8,6 @@ |
| // framework. |
| var resultQueue = new ResultQueue(); |
| -var pushSubscriptionOptions = { |
| - userVisibleOnly: true |
| -}; |
| - |
| // Waits for the given ServiceWorkerRegistration to become ready. |
| // Shim for https://github.com/w3c/ServiceWorker/issues/770. |
| function swRegistrationReady(reg) { |
| @@ -94,6 +90,9 @@ function swapManifestNoSenderId() { |
| // from, where the subscription used a sender ID instead of public key. |
| function documentSubscribePushWithoutKey() { |
| navigator.serviceWorker.ready.then(function(swRegistration) { |
| + let pushSubscriptionOptions = { |
| + userVisibleOnly: true |
| + }; |
| return swRegistration.pushManager.subscribe( |
| pushSubscriptionOptions) |
|
Peter Beverloo
2016/10/31 17:30:20
I see failing tests. Is it possible that subscribi
Peter Beverloo
2016/10/31 17:30:20
nit: consider inlining the dictionary
awdf
2016/10/31 17:35:02
Huh, that's weird, I thought they might but I'm pr
awdf
2016/10/31 18:35:40
Done.
|
| .then(function(subscription) { |
| @@ -104,7 +103,10 @@ function documentSubscribePushWithoutKey() { |
| function documentSubscribePush() { |
| navigator.serviceWorker.ready.then(function(swRegistration) { |
| - pushSubscriptionOptions.applicationServerKey = kApplicationServerKey.buffer; |
| + let pushSubscriptionOptions = { |
|
awdf
2016/10/31 18:35:40
ah did you prefer this one not inlined actually? i
|
| + userVisibleOnly: true, |
| + applicationServerKey: kApplicationServerKey.buffer |
| + }; |
| return swRegistration.pushManager.subscribe(pushSubscriptionOptions) |
| .then(function(subscription) { |
| sendResultToTest(subscription.endpoint); |
| @@ -136,6 +138,9 @@ function GetP256dh() { |
| function permissionState() { |
| navigator.serviceWorker.ready.then(function(swRegistration) { |
| + let pushSubscriptionOptions = { |
| + userVisibleOnly: true |
| + }; |
| return swRegistration.pushManager.permissionState(pushSubscriptionOptions) |
|
Peter Beverloo
2016/10/31 17:30:20
nit: consider inlining the dictionary
awdf
2016/10/31 18:35:40
Done.
|
| .then(function(permission) { |
| sendResultToTest('permission status - ' + permission); |