OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Push API: Verifies the supported content encodings in PushManager.</t
itle> |
| 5 <script src="../resources/testharness.js"></script> |
| 6 <script src="../resources/testharnessreport.js"></script> |
| 7 <script src="../serviceworker/resources/test-helpers.js"></script> |
| 8 </head> |
| 9 <body> |
| 10 <script> |
| 11 // Tests that the expected Content-Encoding values are indicated by the |
| 12 // PushManager.supportedContentEncodings property. |
| 13 test(function() { |
| 14 assert_own_property(window, 'PushManager', 'PushManager needs to be expo
sed as a global.'); |
| 15 assert_own_property(PushManager, 'supportedContentEncodings'); |
| 16 |
| 17 assert_equals(PushManager.supportedContentEncodings, PushManager.support
edContentEncodings); |
| 18 assert_true(Array.isArray(PushManager.supportedContentEncodings)); |
| 19 |
| 20 // TODO(crbug.com/679789): The `aes128gcm` Content-Encoding must be supp
orted as well. |
| 21 assert_equals(PushManager.supportedContentEncodings.length, 1); |
| 22 assert_equals(PushManager.supportedContentEncodings[0], 'aesgcm'); |
| 23 }); |
| 24 </script> |
| 25 </body> |
| 26 </html> |
OLD | NEW |