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

Side by Side Diff: chrome/browser/sync/profile_sync_service_factory_unittest.cc

Issue 1408003010: [sync] Componentize switches used by ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@more_pss_chrome_deps
Patch Set: Rebase Created 5 years, 1 month 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "chrome/browser/sync/profile_sync_service_factory.h" 7 #include "chrome/browser/sync/profile_sync_service_factory.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "components/browser_sync/common/browser_sync_switches.h"
10 #include "content/public/test/test_browser_thread_bundle.h" 11 #include "content/public/test/test_browser_thread_bundle.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 class ProfileSyncServiceFactoryTest : public testing::Test { 14 class ProfileSyncServiceFactoryTest : public testing::Test {
14 protected: 15 protected:
15 ProfileSyncServiceFactoryTest() {} 16 ProfileSyncServiceFactoryTest() {}
16 17
17 void SetUp() override { 18 void SetUp() override {
18 profile_.reset(new TestingProfile()); 19 profile_.reset(new TestingProfile());
19 } 20 }
20 21
21 content::TestBrowserThreadBundle thread_bundle_; 22 content::TestBrowserThreadBundle thread_bundle_;
22 scoped_ptr<Profile> profile_; 23 scoped_ptr<Profile> profile_;
23 }; 24 };
24 25
25 // Verify that the disable sync flag disables creation of the sync service. 26 // Verify that the disable sync flag disables creation of the sync service.
26 TEST_F(ProfileSyncServiceFactoryTest, DisableSyncFlag) { 27 TEST_F(ProfileSyncServiceFactoryTest, DisableSyncFlag) {
27 base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync); 28 base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync);
28 EXPECT_EQ(nullptr, ProfileSyncServiceFactory::GetForProfile(profile_.get())); 29 EXPECT_EQ(nullptr, ProfileSyncServiceFactory::GetForProfile(profile_.get()));
29 } 30 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698