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

Unified Diff: net/http/http_mac_signature_unittest.cc

Issue 7522014: Add WARN_UNUSED_RESULT to crypto/hmac.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto CL 7532020 and update remoting Created 9 years, 5 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
« no previous file with comments | « net/http/http_mac_signature.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_mac_signature_unittest.cc
diff --git a/net/http/http_mac_signature_unittest.cc b/net/http/http_mac_signature_unittest.cc
index e0c6be257ed76359f2b5c7977dcc62aadb465368..74064ddd5f793bbce0e2c178e39c07fe08928511 100644
--- a/net/http/http_mac_signature_unittest.cc
+++ b/net/http/http_mac_signature_unittest.cc
@@ -55,10 +55,12 @@ TEST(HttpMacSignatureTest, GenerateHeaderString) {
std::string age = "239034";
std::string nonce = "mn4302j0n+32r2/f3r=";
+ std::string header_string;
+ EXPECT_TRUE(signature.GenerateHeaderString(age, nonce, &header_string));
EXPECT_EQ("MAC id=\"dfoi30j0qnf\", "
"nonce=\"239034:mn4302j0n+32r2/f3r=\", "
"mac=\"GrkHtPKzB1m1dCHfa7OCWOw6EQ==\"",
- signature.GenerateHeaderString(age, nonce));
+ header_string);
}
@@ -100,7 +102,8 @@ TEST(HttpMacSignatureTest, GenerateMAC) {
std::string age = "239034";
std::string nonce = "mn4302j0n+32r2/f3r=";
- EXPECT_EQ("GrkHtPKzB1m1dCHfa7OCWOw6EQ==",
- signature.GenerateMAC(age, nonce));
+ std::string mac;
+ EXPECT_TRUE(signature.GenerateMAC(age, nonce, &mac));
+ EXPECT_EQ("GrkHtPKzB1m1dCHfa7OCWOw6EQ==", mac);
}
}
« no previous file with comments | « net/http/http_mac_signature.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698