| OLD | NEW |
| 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/cryptauth/fake_secure_message_delegate.h" | 5 #include "components/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 "base/macros.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 TEST_F(CryptAuthFakeSecureMessageDelegateTest, GetPrivateKeyForPublicKey) { | 197 TEST_F(CryptAuthFakeSecureMessageDelegateTest, GetPrivateKeyForPublicKey) { |
| 198 delegate_.set_next_public_key(kTestPublicKey); | 198 delegate_.set_next_public_key(kTestPublicKey); |
| 199 std::string public_key, private_key; | 199 std::string public_key, private_key; |
| 200 delegate_.GenerateKeyPair( | 200 delegate_.GenerateKeyPair( |
| 201 base::Bind(&SaveKeyPair, &public_key, &private_key)); | 201 base::Bind(&SaveKeyPair, &public_key, &private_key)); |
| 202 EXPECT_EQ(kTestPublicKey, public_key); | 202 EXPECT_EQ(kTestPublicKey, public_key); |
| 203 EXPECT_EQ(private_key, delegate_.GetPrivateKeyForPublicKey(kTestPublicKey)); | 203 EXPECT_EQ(private_key, delegate_.GetPrivateKeyForPublicKey(kTestPublicKey)); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // proximity_auth | 206 } // namespace cryptauth |
| OLD | NEW |