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

Unified Diff: components/os_crypt/os_crypt_unittest.cc

Issue 2010463002: Mocker for OSCrypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: components/os_crypt/os_crypt_unittest.cc
diff --git a/components/os_crypt/os_crypt_unittest.cc b/components/os_crypt/os_crypt_unittest.cc
index 9837cbc29a0d8d1725056fdd79006e3e9e54e2ed..ef1971ee0ed4364d2875696272ca33b71ed1a3ac 100644
--- a/components/os_crypt/os_crypt_unittest.cc
+++ b/components/os_crypt/os_crypt_unittest.cc
@@ -11,6 +11,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
+#include "components/os_crypt/os_crypt_mocker.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -19,11 +20,9 @@ class OSCryptTest : public testing::Test {
public:
OSCryptTest() {}
- void SetUp() override {
-#if defined(OS_MACOSX)
- OSCrypt::UseMockKeychain(true);
-#endif
- }
+ void SetUp() override { OSCryptMocker::SetUpWithSingleton(); }
vabr (Chromium) 2016/05/24 13:33:44 Also here, could this be in constructor and destru
cfroussios 2016/05/25 13:13:09 Done.
+
+ void TearDown() override { OSCryptMocker::TearDown(); }
private:
DISALLOW_COPY_AND_ASSIGN(OSCryptTest);

Powered by Google App Engine
This is Rietveld 408576698