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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/push_messaging/pushmanager-supported-content-encodings.html

Issue 2863443002: Implement and ship PushManager.supportedContentEncodings (Closed)
Patch Set: Implement and ship PushManager.supportedContentEncodings 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/push_messaging/pushmanager-supported-content-encodings.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/pushmanager-supported-content-encodings.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/pushmanager-supported-content-encodings.html
new file mode 100644
index 0000000000000000000000000000000000000000..27fcc9e66422cef8365fa626afcc2d80b2ebfe65
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/pushmanager-supported-content-encodings.html
@@ -0,0 +1,26 @@
+<!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));
+
+ // TODO(crbug.com/679789): The `aes128gcm` Content-Encoding must be supported as well.
+ assert_equals(PushManager.supportedContentEncodings.length, 1);
+ assert_equals(PushManager.supportedContentEncodings[0], 'aesgcm');
+ });
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698