blob: 27b8ad3178866f75583cfb91bc9a9e68169c254f [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>Push API: Verifies the supported content encodings in PushManager.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../serviceworker/resources/test-helpers.js"></script>
</head>
<body>
<script>
// Tests that the expected Content-Encoding values are indicated by the
// PushManager.supportedContentEncodings property.
test(function() {
assert_own_property(window, 'PushManager', 'PushManager needs to be exposed as a global.');
assert_own_property(PushManager, 'supportedContentEncodings');
assert_equals(PushManager.supportedContentEncodings, PushManager.supportedContentEncodings);
assert_true(Array.isArray(PushManager.supportedContentEncodings));
assert_equals(PushManager.supportedContentEncodings.length, 2);
const encodings = Array.from(PushManager.supportedContentEncodings).sort();
assert_equals(encodings[0], 'aes128gcm');
assert_equals(encodings[1], 'aesgcm');
});
</script>
</body>
</html>