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

Side by Side Diff: chrome/browser/permissions/permission_uma_util_unittest.cc

Issue 2533083002: [Sync] SyncEngine refactor part 1: interfaces. (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/permissions/permission_uma_util.h" 5 #include "chrome/browser/permissions/permission_uma_util.h"
6 6
7 #include <memory>
8
7 #include "base/test/scoped_command_line.h" 9 #include "base/test/scoped_command_line.h"
8 #include "chrome/browser/signin/fake_signin_manager_builder.h" 10 #include "chrome/browser/signin/fake_signin_manager_builder.h"
9 #include "chrome/browser/signin/signin_manager_factory.h" 11 #include "chrome/browser/signin/signin_manager_factory.h"
10 #include "chrome/browser/sync/profile_sync_service_factory.h" 12 #include "chrome/browser/sync/profile_sync_service_factory.h"
11 #include "chrome/browser/sync/profile_sync_test_util.h" 13 #include "chrome/browser/sync/profile_sync_test_util.h"
12 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
14 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
15 #include "components/browser_sync/browser_sync_switches.h" 17 #include "components/browser_sync/browser_sync_switches.h"
16 #include "components/browser_sync/profile_sync_service.h" 18 #include "components/browser_sync/profile_sync_service.h"
17 #include "components/browser_sync/profile_sync_service_mock.h" 19 #include "components/browser_sync/profile_sync_service_mock.h"
18 #include "components/prefs/pref_service.h" 20 #include "components/prefs/pref_service.h"
19 #include "components/sync/base/model_type.h" 21 #include "components/sync/base/model_type.h"
20 #include "components/sync/base/sync_prefs.h" 22 #include "components/sync/base/sync_prefs.h"
21 #include "components/sync/driver/glue/sync_backend_host_mock.h" 23 #include "components/sync/engine/fake_sync_engine.h"
22 #include "content/public/test/test_browser_thread_bundle.h" 24 #include "content/public/test/test_browser_thread_bundle.h"
23 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
24 26
25 using browser_sync::ProfileSyncServiceMock; 27 using browser_sync::ProfileSyncServiceMock;
26 28
27 namespace { 29 namespace {
28 constexpr char kTestingGaiaId[] = "gaia_id"; 30 constexpr char kTestingGaiaId[] = "gaia_id";
29 constexpr char kTestingUsername[] = "fake_username"; 31 constexpr char kTestingUsername[] = "fake_username";
30 } // namespace 32 } // namespace
31 33
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 IsOptedIntoPermissionActionReportingSyncPassphraseCheck) { 207 IsOptedIntoPermissionActionReportingSyncPassphraseCheck) {
206 SetSafeBrowsing(true); 208 SetSafeBrowsing(true);
207 FakeSignIn(); 209 FakeSignIn();
208 ProfileSyncServiceMock* mock_sync_service = SetMockSyncService(); 210 ProfileSyncServiceMock* mock_sync_service = SetMockSyncService();
209 EXPECT_TRUE(IsOptedIntoPermissionActionReporting(profile())); 211 EXPECT_TRUE(IsOptedIntoPermissionActionReporting(profile()));
210 212
211 EXPECT_CALL(*mock_sync_service, IsUsingSecondaryPassphrase()) 213 EXPECT_CALL(*mock_sync_service, IsUsingSecondaryPassphrase())
212 .WillOnce(testing::Return(true)); 214 .WillOnce(testing::Return(true));
213 EXPECT_FALSE(IsOptedIntoPermissionActionReporting(profile())); 215 EXPECT_FALSE(IsOptedIntoPermissionActionReporting(profile()));
214 } 216 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698