| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Subscribing should provide a P-256 ECDH public key.</title> | 4 <title>Subscribing should provide a P-256 ECDH public key.</title> |
| 5 <link rel="manifest" href="resources/push_manifest.json"> | 5 <link rel="manifest" href="resources/push_manifest.json"> |
| 6 <script src="../resources/testharness.js"></script> | 6 <script src="../resources/testharness.js"></script> |
| 7 <script src="../resources/testharnessreport.js"></script> | 7 <script src="../resources/testharnessreport.js"></script> |
| 8 <script src="../resources/testharness-helpers.js"></script> | |
| 9 <script src="../serviceworker/resources/test-helpers.js"></script> | 8 <script src="../serviceworker/resources/test-helpers.js"></script> |
| 10 </head> | 9 </head> |
| 11 <body> | 10 <body> |
| 12 <script> | 11 <script> |
| 13 // Serializes |buffer| to a base64-encoded string. | 12 // Serializes |buffer| to a base64-encoded string. |
| 14 function SerializeArrayBuffer(buffer) { | 13 function SerializeArrayBuffer(buffer) { |
| 15 return btoa(String.fromCharCode.apply(null, new Uint8Array(buffe
r))); | 14 return btoa(String.fromCharCode.apply(null, new Uint8Array(buffe
r))); |
| 16 } | 15 } |
| 17 | 16 |
| 18 // When running this test manually, grant permission when prompted. | 17 // When running this test manually, grant permission when prompted. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 assert_equals(SerializeArrayBuffer(pushSubscription.getK
ey('p256dh')), encryptionKey); | 74 assert_equals(SerializeArrayBuffer(pushSubscription.getK
ey('p256dh')), encryptionKey); |
| 76 assert_equals(SerializeArrayBuffer(pushSubscription.getK
ey('auth')), encryptionAuth); | 75 assert_equals(SerializeArrayBuffer(pushSubscription.getK
ey('auth')), encryptionAuth); |
| 77 | 76 |
| 78 return service_worker_unregister_and_done(test, workerSc
ope); | 77 return service_worker_unregister_and_done(test, workerSc
ope); |
| 79 }) | 78 }) |
| 80 .catch(unreached_rejection(test)); | 79 .catch(unreached_rejection(test)); |
| 81 | 80 |
| 82 }, 'Subscribing should provide a P-256 ECDH public key'); | 81 }, 'Subscribing should provide a P-256 ECDH public key'); |
| 83 </script> | 82 </script> |
| 84 </body> | 83 </body> |
| 85 </html> | 84 </html> |
| OLD | NEW |