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

Side by Side Diff: components/os_crypt/key_storage_libsecret_unittest.cc

Issue 2297573002: Implement gnome-keyring for OSCrypt (Closed)
Patch Set: removed thread checker Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <string> 5 #include <string>
6 6
7 #include "base/logging.h"
7 #include "base/macros.h" 8 #include "base/macros.h"
8 #include "components/os_crypt/key_storage_libsecret.h" 9 #include "components/os_crypt/key_storage_libsecret.h"
9 #include "components/os_crypt/libsecret_util_linux.h" 10 #include "components/os_crypt/libsecret_util_linux.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace { 13 namespace {
13 14
14 // Mock functions use MockSecretValue, where SecretValue would appear, and are 15 // Mock functions use MockSecretValue, where SecretValue would appear, and are
15 // cast to the correct signature. We can reduce SecretValue to an std::string, 16 // cast to the correct signature. We can reduce SecretValue to an std::string,
16 // because we don't use anything else from it. 17 // because we don't use anything else from it.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 235
235 TEST_F(LibsecretTest, LibsecretMigratesFromSchemaV1ToV2) { 236 TEST_F(LibsecretTest, LibsecretMigratesFromSchemaV1ToV2) {
236 KeyStorageLibsecret libsecret; 237 KeyStorageLibsecret libsecret;
237 MockLibsecretLoader::ResetForOSCrypt(); 238 MockLibsecretLoader::ResetForOSCrypt();
238 MockLibsecretLoader::SetDeprecatedOSCryptPassword("swallow"); 239 MockLibsecretLoader::SetDeprecatedOSCryptPassword("swallow");
239 std::string password = libsecret.GetKey(); 240 std::string password = libsecret.GetKey();
240 EXPECT_EQ("swallow", password); 241 EXPECT_EQ("swallow", password);
241 } 242 }
242 243
243 } // namespace 244 } // namespace
OLDNEW
« no previous file with comments | « components/os_crypt/key_storage_keyring_unittest.cc ('k') | components/os_crypt/key_storage_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698