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

Side by Side Diff: ios/chrome/browser/ui/settings/content_settings_collection_view_controller_unittest.mm

Issue 2589583003: Upstream Chrome on iOS source code [7/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 2013 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 #import "ios/chrome/browser/ui/settings/content_settings_collection_view_control ler.h"
6
7 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
8 #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h "
9 #include "ios/chrome/grit/ios_strings.h"
10 #include "ios/web/public/test/test_web_thread_bundle.h"
11
12 namespace {
13
14 class ContentSettingsCollectionViewControllerTest
15 : public CollectionViewControllerTest {
16 protected:
17 void SetUp() override {
18 CollectionViewControllerTest::SetUp();
19 TestChromeBrowserState::Builder test_cbs_builder;
20 chrome_browser_state_ = test_cbs_builder.Build();
21 }
22
23 CollectionViewController* NewController() override NS_RETURNS_RETAINED {
24 return [[ContentSettingsCollectionViewController alloc]
25 initWithBrowserState:chrome_browser_state_.get()];
26 }
27
28 private:
29 web::TestWebThreadBundle thread_bundle_;
30 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
31 };
32
33 TEST_F(ContentSettingsCollectionViewControllerTest, TestModel) {
34 CreateController();
35 CheckController();
36 CheckTitleWithId(IDS_IOS_CONTENT_SETTINGS_TITLE);
37
38 int expectedNumberOfItems = 2;
39 ASSERT_EQ(1, NumberOfSections());
40 EXPECT_EQ(expectedNumberOfItems, NumberOfItemsInSection(0));
41 CheckDetailItemTextWithIds(IDS_IOS_BLOCK_POPUPS, IDS_IOS_SETTING_ON, 0, 0);
42 CheckDetailItemTextWithIds(IDS_IOS_TRANSLATE_SETTING, IDS_IOS_SETTING_ON, 0,
43 1);
44 }
45
46 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698