| 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 "chrome/browser/password_manager/encryptor.h" | |
| 6 #include "chrome/browser/sync/glue/chrome_encryptor.h" | 5 #include "chrome/browser/sync/glue/chrome_encryptor.h" |
| 6 #include "components/webdata/encryptor/encryptor.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 namespace browser_sync { | 9 namespace browser_sync { |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 const char kPlaintext[] = "The Magic Words are Squeamish Ossifrage"; | 13 const char kPlaintext[] = "The Magic Words are Squeamish Ossifrage"; |
| 14 | 14 |
| 15 class ChromeEncryptorTest : public testing::Test { | 15 class ChromeEncryptorTest : public testing::Test { |
| 16 protected: | 16 protected: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 27 EXPECT_TRUE(encryptor_.EncryptString(kPlaintext, &ciphertext)); | 27 EXPECT_TRUE(encryptor_.EncryptString(kPlaintext, &ciphertext)); |
| 28 EXPECT_NE(kPlaintext, ciphertext); | 28 EXPECT_NE(kPlaintext, ciphertext); |
| 29 std::string plaintext; | 29 std::string plaintext; |
| 30 EXPECT_TRUE(encryptor_.DecryptString(ciphertext, &plaintext)); | 30 EXPECT_TRUE(encryptor_.DecryptString(ciphertext, &plaintext)); |
| 31 EXPECT_EQ(kPlaintext, plaintext); | 31 EXPECT_EQ(kPlaintext, plaintext); |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 } // namespace browser_sync | 36 } // namespace browser_sync |
| OLD | NEW |