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

Unified Diff: components/sync/driver/system_encryptor_unittest.cc

Issue 2395533003: [Sync] Move some things from driver to base. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/system_encryptor.cc ('k') | components/sync/tools/sync_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/system_encryptor_unittest.cc
diff --git a/components/sync/driver/system_encryptor_unittest.cc b/components/sync/driver/system_encryptor_unittest.cc
deleted file mode 100644
index 9647bac1e85220e3a3fc14445c6434607bcd1885..0000000000000000000000000000000000000000
--- a/components/sync/driver/system_encryptor_unittest.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/sync/driver/system_encryptor.h"
-
-#include "build/build_config.h"
-#include "components/os_crypt/os_crypt_mocker.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace syncer {
-
-namespace {
-
-const char kPlaintext[] = "The Magic Words are Squeamish Ossifrage";
-
-class SystemEncryptorTest : public testing::Test {
- protected:
- SystemEncryptor encryptor_;
-};
-
-TEST_F(SystemEncryptorTest, EncryptDecrypt) {
- // SystemEncryptor ends up needing access to the keychain on OS X,
- // so use the mock keychain to prevent prompts.
- ::OSCryptMocker::SetUpWithSingleton();
- std::string ciphertext;
- EXPECT_TRUE(encryptor_.EncryptString(kPlaintext, &ciphertext));
- EXPECT_NE(kPlaintext, ciphertext);
- std::string plaintext;
- EXPECT_TRUE(encryptor_.DecryptString(ciphertext, &plaintext));
- EXPECT_EQ(kPlaintext, plaintext);
- ::OSCryptMocker::TearDown();
-}
-
-} // namespace
-
-} // namespace syncer
« no previous file with comments | « components/sync/driver/system_encryptor.cc ('k') | components/sync/tools/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698