| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Stringifying a PushSubscription object includes all object members</title
> | 4 <title>Stringifying a PushSubscription object includes all object members</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 // Converts an ArrayBuffer to a base64url encoded string. | 12 // Converts an ArrayBuffer to a base64url encoded string. |
| 14 function ArrayBufferToBase64UrlEncodedString(buffer) { | 13 function ArrayBufferToBase64UrlEncodedString(buffer) { |
| 15 var base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(buffer))); | 14 var base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(buffer))); |
| 16 return base64.replace(/\//g, '_').replace(/\+/g, '-'); | 15 return base64.replace(/\//g, '_').replace(/\+/g, '-'); |
| 17 } | 16 } |
| 18 | 17 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 47 assert_equals(reflectedObject.keys.p256dh, key); | 46 assert_equals(reflectedObject.keys.p256dh, key); |
| 48 assert_equals(reflectedObject.keys.auth, auth); | 47 assert_equals(reflectedObject.keys.auth, auth); |
| 49 | 48 |
| 50 return service_worker_unregister_and_done(test, workerScope); | 49 return service_worker_unregister_and_done(test, workerScope); |
| 51 }) | 50 }) |
| 52 .catch(unreached_rejection(test)); | 51 .catch(unreached_rejection(test)); |
| 53 }, 'Stringifying a PushSubscription object includes all object members'); | 52 }, 'Stringifying a PushSubscription object includes all object members'); |
| 54 </script> | 53 </script> |
| 55 </body> | 54 </body> |
| 56 </html> | 55 </html> |
| OLD | NEW |