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

Side by Side Diff: ios/chrome/browser/ui/settings/passphrase_collection_view_controller_test.h

Issue 2587023002: Upstream Chrome on iOS source code [8/11]. (Closed)
Patch Set: 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_PASSPHRASE_COLLECTION_VIEW_CONTROLLER_TES T_H_
6 #define IOS_CHROME_BROWSER_UI_SETTINGS_PASSPHRASE_COLLECTION_VIEW_CONTROLLER_TES T_H_
7
8 #include <memory>
9
10 #include "base/compiler_specific.h"
11 #include "base/mac/scoped_nsobject.h"
12 #include "components/keyed_service/core/keyed_service.h"
13 #include "components/sync/engine/cycle/sync_cycle_snapshot.h"
14 #include "google_apis/gaia/google_service_auth_error.h"
15 #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h "
16 #include "ios/web/public/test/test_web_thread_bundle.h"
17 #include "testing/platform_test.h"
18
19 namespace browser_sync {
20 class ProfileSyncServiceMock;
21 } // namespace browser_sync
22
23 namespace web {
24 class BrowserState;
25 } // namespace web
26
27 class TestChromeBrowserState;
28 @class UINavigationController;
29 @class UIViewController;
30
31 // Base class for PassphraseCollectionViewController tests.
32 // Sets up a testing profile and a mock profile sync service, along with the
33 // supporting structure they require.
34 class PassphraseCollectionViewControllerTest
35 : public CollectionViewControllerTest {
36 public:
37 static std::unique_ptr<KeyedService> CreateNiceProfileSyncServiceMock(
38 web::BrowserState* context);
39
40 PassphraseCollectionViewControllerTest();
41 ~PassphraseCollectionViewControllerTest() override;
42
43 protected:
44 void SetUp() override;
45
46 void SetUpNavigationController(UIViewController* test_controller);
47
48 web::TestWebThreadBundle thread_bundle_;
49
50 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
51 // Weak, owned by chrome_browser_state_.
52 browser_sync::ProfileSyncServiceMock* fake_sync_service_;
53
54 // Default return values for NiceMock<browser_sync::ProfileSyncServiceMock>.
55 GoogleServiceAuthError default_auth_error_;
56 syncer::SyncCycleSnapshot default_sync_cycle_snapshot_;
57
58 // Dummy navigation stack for testing self-removal.
59 // Only valid when SetUpNavigationController has been called.
60 base::scoped_nsobject<UIViewController> dummy_controller_;
61 base::scoped_nsobject<UINavigationController> nav_controller_;
62 };
63
64 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_PASSPHRASE_COLLECTION_VIEW_CONTROLLER_ TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698