| Index: components/gcm_driver/crypto/encryption_header_parsers_unittest.cc
|
| diff --git a/components/gcm_driver/crypto/encryption_header_parsers_unittest.cc b/components/gcm_driver/crypto/encryption_header_parsers_unittest.cc
|
| index 9afac81d92fda0aad6bf29beb52425f8e5532897..b7142cee2a224262dcff56a36f150e8d7bef8f97 100644
|
| --- a/components/gcm_driver/crypto/encryption_header_parsers_unittest.cc
|
| +++ b/components/gcm_driver/crypto/encryption_header_parsers_unittest.cc
|
| @@ -42,7 +42,6 @@ TEST(EncryptionHeaderParsersTest, ParseValidEncryptionHeaders) {
|
| "", "sixteencoolbytes", kDefaultRecordSize },
|
| { "rs=2048", "", "", 2048 },
|
| { "keyid=foo;someothervalue=1;rs=42", "foo", "", 42 },
|
| - { "keyid=foo;keyid=bar", "bar", "", kDefaultRecordSize },
|
| };
|
|
|
| for (size_t i = 0; i < arraysize(expected_results); i++) {
|
| @@ -116,6 +115,10 @@ TEST(EncryptionHeaderParsersTest, ParseInvalidEncryptionHeaders) {
|
| "rs",
|
| "rs=",
|
|
|
| + // Supplying the same name multiple times in the same value is invalid.
|
| + "keyid=foo;keyid=bar",
|
| + "keyid=foo;bar=baz;keyid=qux",
|
| +
|
| // The salt must be a URL-safe base64 decodable string.
|
| "salt=YmV/2ZXJ-sMDA",
|
| "salt=dHdlbHZlY29vbGJ5dGVz=====",
|
| @@ -187,7 +190,6 @@ TEST(EncryptionHeaderParsersTest, ParseValidCryptoKeyHeaders) {
|
| { "dh=dHdlbHZlY29vbGJ5dGVz", "", "", "twelvecoolbytes" },
|
| { "keyid=foo;someothervalue=bar;aesgcm128=dHdlbHZlY29vbGJ5dGVz",
|
| "foo", "twelvecoolbytes", "" },
|
| - { "keyid=foo;keyid=bar", "bar", "", "" },
|
| };
|
|
|
| for (size_t i = 0; i < arraysize(expected_results); i++) {
|
| @@ -262,6 +264,10 @@ TEST(EncryptionHeaderParsersTest, ParseInvalidCryptoKeyHeaders) {
|
| "dh",
|
| "dh=",
|
|
|
| + // Supplying the same name multiple times in the same value is invalid.
|
| + "keyid=foo;keyid=bar",
|
| + "keyid=foo;bar=baz;keyid=qux",
|
| +
|
| // The "aesgcm128" parameter must be a URL-safe base64 decodable string.
|
| "aesgcm128=123$xyz",
|
| "aesgcm128=foobar;aesgcm128=123$xyz",
|
|
|