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

Side by Side Diff: ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm

Issue 2574213002: Split //ios/chrome/browser/prefs to prevent circular dependencies. (Closed)
Patch Set: Address comments. 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/chrome/browser/device_sharing/device_sharing_manager.h" 5 #include "ios/chrome/browser/device_sharing/device_sharing_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #import "components/handoff/handoff_manager.h" 11 #import "components/handoff/handoff_manager.h"
12 #include "components/handoff/pref_names_ios.h"
12 #include "components/sync_preferences/testing_pref_service_syncable.h" 13 #include "components/sync_preferences/testing_pref_service_syncable.h"
13 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" 14 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
14 #include "ios/chrome/browser/pref_names.h"
15 #include "ios/web/public/test/test_web_thread_bundle.h" 15 #include "ios/web/public/test/test_web_thread_bundle.h"
16 #include "testing/platform_test.h" 16 #include "testing/platform_test.h"
17 #import "third_party/ocmock/OCMock/OCMock.h" 17 #import "third_party/ocmock/OCMock/OCMock.h"
18 #import "third_party/ocmock/gtest_support.h" 18 #import "third_party/ocmock/gtest_support.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 @interface TestDeviceSharingManager : DeviceSharingManager 21 @interface TestDeviceSharingManager : DeviceSharingManager
22 + (HandoffManager*)createHandoffManager; 22 + (HandoffManager*)createHandoffManager;
23 @end 23 @end
24 24
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 TEST_F(DeviceSharingManagerTest, DisableHandoffViaPrefs) { 107 TEST_F(DeviceSharingManagerTest, DisableHandoffViaPrefs) {
108 [sharing_manager_ updateBrowserState:chrome_browser_state_.get()]; 108 [sharing_manager_ updateBrowserState:chrome_browser_state_.get()];
109 EXPECT_TRUE([sharing_manager_ handoffManager]); 109 EXPECT_TRUE([sharing_manager_ handoffManager]);
110 sync_preferences::TestingPrefServiceSyncable* prefs = 110 sync_preferences::TestingPrefServiceSyncable* prefs =
111 chrome_browser_state_->GetTestingPrefService(); 111 chrome_browser_state_->GetTestingPrefService();
112 prefs->SetBoolean(prefs::kIosHandoffToOtherDevices, false); 112 prefs->SetBoolean(prefs::kIosHandoffToOtherDevices, false);
113 EXPECT_FALSE([sharing_manager_ handoffManager]); 113 EXPECT_FALSE([sharing_manager_ handoffManager]);
114 } 114 }
115 115
116 } // namespace 116 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/device_sharing/device_sharing_manager.mm ('k') | ios/chrome/browser/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698