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

Side by Side Diff: chrome/browser/sync/glue/chrome_encryptor_unittest.cc

Issue 12902030: Make Encryptor a component. Used by //chrome and (soon) //components/webdata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove duplicate include. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/chrome_encryptor.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698