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> | |
8 | |
9 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
10 #include "components/sync/base/fake_encryptor.h" | 8 #include "components/sync/base/fake_encryptor.h" |
11 #include "components/sync/protocol/password_specifics.pb.h" | 9 #include "components/sync/protocol/password_specifics.pb.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
14 | 12 |
15 namespace syncer { | 13 namespace syncer { |
16 | 14 |
17 namespace { | 15 namespace { |
18 | 16 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 ASSERT_TRUE(another_cryptographer.CanDecrypt(keys)); | 295 ASSERT_TRUE(another_cryptographer.CanDecrypt(keys)); |
298 another_cryptographer.InstallKeys(keys); | 296 another_cryptographer.InstallKeys(keys); |
299 | 297 |
300 // Verify that bootstrapped cryptographer decrypts succesfully using | 298 // Verify that bootstrapped cryptographer decrypts succesfully using |
301 // all the keys after key installation. | 299 // all the keys after key installation. |
302 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k1)); | 300 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k1)); |
303 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k2)); | 301 EXPECT_TRUE(another_cryptographer.CanDecrypt(encrypted_k2)); |
304 } | 302 } |
305 | 303 |
306 } // namespace syncer | 304 } // namespace syncer |
OLD | NEW |