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

Unified Diff: chrome/browser/password_manager/password_store_unittest.cc

Issue 160463002: Remove references to TestingProfile from password store unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « chrome/browser/password_manager/password_store_default_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_store_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_unittest.cc b/chrome/browser/password_manager/password_store_unittest.cc
index 868dbd8a5f61542539df3c85e583cc05acfc92ab..62fc6cc221b99faf280e2d6c122e7885fa8af4e5 100644
--- a/chrome/browser/password_manager/password_store_unittest.cc
+++ b/chrome/browser/password_manager/password_store_unittest.cc
@@ -4,11 +4,11 @@
#include "base/basictypes.h"
#include "base/bind.h"
+#include "base/files/scoped_temp_dir.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/time/time.h"
-#include "chrome/test/base/testing_profile.h"
#include "components/password_manager/core/browser/password_form_data.h"
#include "components/password_manager/core/browser/password_store_consumer.h"
#include "components/password_manager/core/browser/password_store_default.h"
@@ -33,17 +33,20 @@ class MockPasswordStoreConsumer : public PasswordStoreConsumer {
class PasswordStoreTest : public testing::Test {
protected:
- virtual void SetUp() {
- profile_.reset(new TestingProfile());
-
+ virtual void SetUp() OVERRIDE {
+ ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
login_db_.reset(new LoginDatabase());
- ASSERT_TRUE(login_db_->Init(profile_->GetPath().Append(
+ ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append(
FILE_PATH_LITERAL("login_test"))));
}
+ virtual void TearDown() OVERRIDE {
+ ASSERT_TRUE(temp_dir_.Delete());
+ }
+
base::MessageLoopForUI message_loop_;
scoped_ptr<LoginDatabase> login_db_;
- scoped_ptr<TestingProfile> profile_;
+ base::ScopedTempDir temp_dir_;
};
ACTION(STLDeleteElements0) {
« no previous file with comments | « chrome/browser/password_manager/password_store_default_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698