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

Unified Diff: chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_unittest.cc

Issue 218903005: Make push messaging not create InvalidationService for login and guest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make code resilient against tests that do not create the Default profile first. Created 6 years, 9 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/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_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/sync_file_system/drive_backend_v1/drive_file_sync_service_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_unittest.cc
index 9931fe15a5697df38268a25543d2c566ad0c0a19..4ecca738700c0dd9cf68ce4ac4b174cf2d495445 100644
--- a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_unittest.cc
@@ -11,7 +11,9 @@
#include "chrome/browser/sync_file_system/drive_backend_v1/fake_api_util.h"
#include "chrome/browser/sync_file_system/sync_file_system.pb.h"
#include "chrome/browser/sync_file_system/syncable_file_system_util.h"
+#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
+#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,6 +24,8 @@ using drive_backend::FakeAPIUtil;
namespace {
+const char kTestProfileName[] = "test-profile";
+
const char kSyncRootResourceId[] = "folder:sync_root_resource_id";
void DidInitialize(bool* done, SyncStatusCode status, bool created) {
@@ -47,10 +51,13 @@ class DriveFileSyncServiceTest : public testing::Test {
public:
DriveFileSyncServiceTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+ profile_manager_(TestingBrowserProcess::GetGlobal()),
fake_api_util_(NULL),
metadata_store_(NULL) {}
virtual void SetUp() OVERRIDE {
+ ASSERT_TRUE(profile_manager_.SetUp());
+
RegisterSyncableFileSystem();
fake_api_util_ = new FakeAPIUtil;
@@ -65,7 +72,7 @@ class DriveFileSyncServiceTest : public testing::Test {
EXPECT_TRUE(done);
sync_service_ = DriveFileSyncService::CreateForTesting(
- &profile_,
+ profile_manager_.CreateTestingProfile(kTestProfileName),
base_dir_,
scoped_ptr<APIUtilInterface>(fake_api_util_),
scoped_ptr<DriveMetadataStore>(metadata_store_)).Pass();
@@ -140,7 +147,7 @@ class DriveFileSyncServiceTest : public testing::Test {
base::ScopedTempDir scoped_base_dir_;
content::TestBrowserThreadBundle thread_bundle_;
- TestingProfile profile_;
+ TestingProfileManager profile_manager_;
base::FilePath base_dir_;
FakeAPIUtil* fake_api_util_; // Owned by |sync_service_|.
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698