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

Unified Diff: components/autofill/core/browser/webdata/autofill_table_unittest.cc

Issue 2010463002: Mocker for OSCrypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated doc 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
« no previous file with comments | « components/autofill/core/browser/personal_data_manager_unittest.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/webdata/autofill_table_unittest.cc
diff --git a/components/autofill/core/browser/webdata/autofill_table_unittest.cc b/components/autofill/core/browser/webdata/autofill_table_unittest.cc
index b16166e192922960180a7c1407cb85cb653ff7f0..1fff97fc5f828632c8f30774f09b5aed6ea17ad9 100644
--- a/components/autofill/core/browser/webdata/autofill_table_unittest.cc
+++ b/components/autofill/core/browser/webdata/autofill_table_unittest.cc
@@ -4,6 +4,9 @@
#include <stddef.h>
+#include <map>
+#include <set>
+#include <string>
#include <tuple>
#include <utility>
#include <vector>
@@ -31,7 +34,7 @@
#include "components/autofill/core/common/autofill_switches.h"
#include "components/autofill/core/common/autofill_util.h"
#include "components/autofill/core/common/form_field_data.h"
-#include "components/os_crypt/os_crypt.h"
+#include "components/os_crypt/os_crypt_mocker.h"
#include "components/webdata/common/web_database.h"
#include "sql/statement.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -123,9 +126,7 @@ class AutofillTableTest : public testing::Test {
protected:
void SetUp() override {
-#if defined(OS_MACOSX)
- OSCrypt::UseMockKeychain(true);
-#endif
+ OSCryptMocker::SetUpWithSingleton();
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
file_ = temp_dir_.path().AppendASCII("TestWebDatabase");
@@ -135,6 +136,8 @@ class AutofillTableTest : public testing::Test {
ASSERT_EQ(sql::INIT_OK, db_->Init(file_));
}
+ void TearDown() override { OSCryptMocker::TearDown(); }
+
base::FilePath file_;
base::ScopedTempDir temp_dir_;
std::unique_ptr<AutofillTable> table_;
« no previous file with comments | « components/autofill/core/browser/personal_data_manager_unittest.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698