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

Unified Diff: remoting/host/heartbeat_sender_unittest.cc

Issue 1131653002: Use lower-case JIDs when generating signatures for messages sent to CRD bot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/host/register_support_host_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/heartbeat_sender_unittest.cc
diff --git a/remoting/host/heartbeat_sender_unittest.cc b/remoting/host/heartbeat_sender_unittest.cc
index 38fee244802f22d792ef0a74901ed50b23c0152e..dd9411ce6b21784349f93f4ca41693682b0b0374 100644
--- a/remoting/host/heartbeat_sender_unittest.cc
+++ b/remoting/host/heartbeat_sender_unittest.cc
@@ -38,7 +38,8 @@ namespace {
const char kTestBotJid[] = "remotingunittest@bot.talk.google.com";
const char kHostId[] = "0";
-const char kTestJid[] = "user@gmail.com/chromoting123";
+const char kTestJid[] = "User@gmail.com/chromotingABC123";
+const char kTestJidNormalized[] = "user@gmail.com/chromotingABC123";
const char kStanzaId[] = "123";
const int kTestInterval = 123;
const base::TimeDelta kTestTimeout = base::TimeDelta::FromSeconds(123);
@@ -362,8 +363,8 @@ void HeartbeatSenderTest::ValidateHeartbeatStanza(
scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(kTestRsaKeyPair);
ASSERT_TRUE(key_pair.get());
- std::string expected_signature =
- key_pair->SignMessage(std::string(kTestJid) + ' ' + expected_sequence_id);
+ std::string expected_signature = key_pair->SignMessage(
+ std::string(kTestJidNormalized) + ' ' + expected_sequence_id);
EXPECT_EQ(expected_signature, signature->BodyText());
}
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/host/register_support_host_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698