| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync/base/cryptographer.h" | 5 #include "components/sync/base/cryptographer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "components/sync/base/fake_encryptor.h" |
| 10 #include "components/sync/protocol/password_specifics.pb.h" | 11 #include "components/sync/protocol/password_specifics.pb.h" |
| 11 #include "components/sync/test/fake_encryptor.h" | |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 using ::testing::_; | 19 using ::testing::_; |
| 20 | 20 |
| 21 } // namespace | 21 } // namespace |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 ASSERT_TRUE(another_cryptographer.CanDecrypt(keys)); | 297 ASSERT_TRUE(another_cryptographer.CanDecrypt(keys)); |
| 298 another_cryptographer.InstallKeys(keys); | 298 another_cryptographer.InstallKeys(keys); |
| 299 | 299 |
| 300 // Verify that bootstrapped cryptographer decrypts succesfully using | 300 // Verify that bootstrapped cryptographer decrypts succesfully using |
| 301 // all the keys after key installation. | 301 // all the keys after key installation. |
| 302 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k1)); | 302 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k1)); |
| 303 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k2)); | 303 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k2)); |
| 304 } | 304 } |
| 305 | 305 |
| 306 } // namespace syncer | 306 } // namespace syncer |
| OLD | NEW |