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

Unified Diff: third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp

Issue 1636873005: blink: Fix naming and const-ness of constants and non-constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants: . Created 4 years, 11 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/Source/core/frame/SubresourceIntegrityTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp b/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp
index 9498e670efeebc75937fd3e86cc0f7394223652b..02d673de5d4e5430d421df5f96c9e07a0b194b97 100644
--- a/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp
+++ b/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp
@@ -308,39 +308,39 @@ TEST_F(SubresourceIntegrityTest, Parsing)
expectParseMultipleHashes("", 0, 0);
expectParseMultipleHashes(" ", 0, 0);
- const IntegrityMetadata kValidSha384AndSha512[] = {
- {"XVVXBGoYw6AJOh9J+Z8pBDMVVPfkBpngexkA7JqZu8d5GENND6TEIup/tA1v5GPr", HashAlgorithmSha384},
danakj 2016/01/26 23:04:02 This looks like it's doing struct initialization,
- {"tbUPioKbVBplr0b1ucnWB57SJWt4x9dOE0Vy2mzCXvH3FepqDZ+07yMK81ytlg0MPaIrPAjcHqba5csorDWtKg==", HashAlgorithmSha512}
+ const IntegrityMetadata validSha384AndSha512[] = {
+ IntegrityMetadata("XVVXBGoYw6AJOh9J+Z8pBDMVVPfkBpngexkA7JqZu8d5GENND6TEIup/tA1v5GPr", HashAlgorithmSha384),
+ IntegrityMetadata("tbUPioKbVBplr0b1ucnWB57SJWt4x9dOE0Vy2mzCXvH3FepqDZ+07yMK81ytlg0MPaIrPAjcHqba5csorDWtKg==", HashAlgorithmSha512),
};
expectParseMultipleHashes(
"sha384-XVVXBGoYw6AJOh9J+Z8pBDMVVPfkBpngexkA7JqZu8d5GENND6TEIup/tA1v5GPr sha512-tbUPioKbVBplr0b1ucnWB57SJWt4x9dOE0Vy2mzCXvH3FepqDZ+07yMK81ytlg0MPaIrPAjcHqba5csorDWtKg==",
- kValidSha384AndSha512,
- WTF_ARRAY_LENGTH(kValidSha384AndSha512));
+ validSha384AndSha512,
+ WTF_ARRAY_LENGTH(validSha384AndSha512));
- const IntegrityMetadata kValidSha256AndSha256[] = {
- {"BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=", HashAlgorithmSha256},
- {"deadbeef", HashAlgorithmSha256}
+ const IntegrityMetadata validSha256AndSha256[] = {
+ IntegrityMetadata("BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=", HashAlgorithmSha256),
+ IntegrityMetadata("deadbeef", HashAlgorithmSha256),
};
expectParseMultipleHashes(
"sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE= sha256-deadbeef",
- kValidSha256AndSha256,
- WTF_ARRAY_LENGTH(kValidSha256AndSha256));
+ validSha256AndSha256,
+ WTF_ARRAY_LENGTH(validSha256AndSha256));
- const IntegrityMetadata kValidSha256AndInvalidSha256[] = {
- {"BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=", HashAlgorithmSha256}
+ const IntegrityMetadata validSha256AndInvalidSha256[] = {
+ IntegrityMetadata("BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=", HashAlgorithmSha256),
};
expectParseMultipleHashes(
"sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE= sha256-!!!!",
- kValidSha256AndInvalidSha256,
- WTF_ARRAY_LENGTH(kValidSha256AndInvalidSha256));
+ validSha256AndInvalidSha256,
+ WTF_ARRAY_LENGTH(validSha256AndInvalidSha256));
- const IntegrityMetadata kInvalidSha256AndValidSha256[] = {
- {"BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=", HashAlgorithmSha256}
+ const IntegrityMetadata invalidSha256AndValidSha256[] = {
+ IntegrityMetadata("BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=", HashAlgorithmSha256),
};
expectParseMultipleHashes(
"sha256-!!! sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=",
- kInvalidSha256AndValidSha256,
- WTF_ARRAY_LENGTH(kInvalidSha256AndValidSha256));
+ invalidSha256AndValidSha256,
+ WTF_ARRAY_LENGTH(invalidSha256AndValidSha256));
expectParse(
"sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=?foo=bar",

Powered by Google App Engine
This is Rietveld 408576698