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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/push_messaging/push-subscription-stringification.html

Issue 2864603003: Implement and ship PushSubscription.expirationTime (Closed)
Patch Set: mac results Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-document.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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="../serviceworker/resources/test-helpers.js"></script> 8 <script src="../serviceworker/resources/test-helpers.js"></script>
9 </head> 9 </head>
10 <body> 10 <body>
(...skipping 18 matching lines...) Expand all
29 if (window.testRunner) 29 if (window.testRunner)
30 testRunner.setPermission('push-messaging', 'granted', location.o rigin, location.origin); 30 testRunner.setPermission('push-messaging', 'granted', location.o rigin, location.origin);
31 return swRegistration.pushManager.subscribe(); 31 return swRegistration.pushManager.subscribe();
32 }) 32 })
33 .then(function(pushSubscription) { 33 .then(function(pushSubscription) {
34 var reflectedObject = JSON.parse(JSON.stringify(pushSubscription)); 34 var reflectedObject = JSON.parse(JSON.stringify(pushSubscription));
35 35
36 assert_own_property(reflectedObject, 'endpoint'); 36 assert_own_property(reflectedObject, 'endpoint');
37 assert_equals(reflectedObject.endpoint, pushSubscription.endpoint); 37 assert_equals(reflectedObject.endpoint, pushSubscription.endpoint);
38 38
39 assert_own_property(reflectedObject, 'expirationTime');
40 assert_equals(reflectedObject.expirationTime, null);
41
39 assert_own_property(reflectedObject, 'keys'); 42 assert_own_property(reflectedObject, 'keys');
40 assert_own_property(reflectedObject.keys, 'p256dh'); 43 assert_own_property(reflectedObject.keys, 'p256dh');
41 assert_own_property(reflectedObject.keys, 'auth'); 44 assert_own_property(reflectedObject.keys, 'auth');
42 45
43 var key = ArrayBufferToBase64UrlEncodedString(pushSubscription.getKe y('p256dh')), 46 var key = ArrayBufferToBase64UrlEncodedString(pushSubscription.getKe y('p256dh')),
44 auth = ArrayBufferToBase64UrlEncodedString(pushSubscription.getK ey('auth')); 47 auth = ArrayBufferToBase64UrlEncodedString(pushSubscription.getK ey('auth'));
45 48
46 assert_equals(reflectedObject.keys.p256dh, key); 49 assert_equals(reflectedObject.keys.p256dh, key);
47 assert_equals(reflectedObject.keys.auth, auth); 50 assert_equals(reflectedObject.keys.auth, auth);
48 51
49 return service_worker_unregister_and_done(test, workerScope); 52 return service_worker_unregister_and_done(test, workerScope);
50 }) 53 })
51 .catch(unreached_rejection(test)); 54 .catch(unreached_rejection(test));
52 }, 'Stringifying a PushSubscription object includes all object members'); 55 }, 'Stringifying a PushSubscription object includes all object members');
53 </script> 56 </script>
54 </body> 57 </body>
55 </html> 58 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-document.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698