1
0
Fork 0
firefox/testing/web-platform/tests/push-api/supported-encodings.https.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

26 lines
724 B
JavaScript

// META: global=window,worker
"use strict"
// (for FrozenArray assign test)
test(() => {
assert_true(
PushManager.supportedContentEncodings.includes("aes128gcm"),
"PushManager.supportedContentEncodings must include aes128gcm"
);
}, "aes128gcm must be supported");
test(() => {
assert_throws_js(
TypeError,
() => PushManager.supportedContentEncodings[0] = "aes1024gcm",
"supportedContentEncodings must be frozen"
);
// Intentionally not using assert_array_equals to check same-object
assert_equals(
PushManager.supportedContentEncodings,
PushManager.supportedContentEncodings,
"supportedContentEncodings must be cached"
);
}, "supportedContentEncodings must be FrozenArray")