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

Side by Side Diff: components/proximity_auth/cryptauth/fake_secure_message_delegate_unittest.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" 5 #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 10
10 namespace proximity_auth { 11 namespace proximity_auth {
11 12
12 namespace { 13 namespace {
13 14
14 const char kTestPublicKey[] = "the private key is in another castle"; 15 const char kTestPublicKey[] = "the private key is in another castle";
15 const char kPayload[] = "500 tons of uranium"; 16 const char kPayload[] = "500 tons of uranium";
16 const char kSymmetricKey[] = "hunter2"; 17 const char kSymmetricKey[] = "hunter2";
17 const char kPublicMetadata[] = "brought to you by our sponsors"; 18 const char kPublicMetadata[] = "brought to you by our sponsors";
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 TEST_F(ProximityAuthFakeSecureMessageDelegateTest, GetPrivateKeyForPublicKey) { 197 TEST_F(ProximityAuthFakeSecureMessageDelegateTest, GetPrivateKeyForPublicKey) {
197 delegate_.set_next_public_key(kTestPublicKey); 198 delegate_.set_next_public_key(kTestPublicKey);
198 std::string public_key, private_key; 199 std::string public_key, private_key;
199 delegate_.GenerateKeyPair( 200 delegate_.GenerateKeyPair(
200 base::Bind(&SaveKeyPair, &public_key, &private_key)); 201 base::Bind(&SaveKeyPair, &public_key, &private_key));
201 EXPECT_EQ(kTestPublicKey, public_key); 202 EXPECT_EQ(kTestPublicKey, public_key);
202 EXPECT_EQ(private_key, delegate_.GetPrivateKeyForPublicKey(kTestPublicKey)); 203 EXPECT_EQ(private_key, delegate_.GetPrivateKeyForPublicKey(kTestPublicKey));
203 } 204 }
204 205
205 } // proximity_auth 206 } // proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698