| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #import "ios/chrome/browser/ui/settings/privacy_collection_view_controller.h" | 5 #import "ios/chrome/browser/ui/settings/privacy_collection_view_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 web::TestWebThreadBundle thread_bundle_; | 79 web::TestWebThreadBundle thread_bundle_; |
| 80 IOSChromeScopedTestingLocalState local_state_; | 80 IOSChromeScopedTestingLocalState local_state_; |
| 81 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_; | 81 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_; |
| 82 base::scoped_nsobject<NSString> initialValueForSpdyProxyEnabled_; | 82 base::scoped_nsobject<NSString> initialValueForSpdyProxyEnabled_; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // Tests PrivacyCollectionViewController is set up with all appropriate items | 85 // Tests PrivacyCollectionViewController is set up with all appropriate items |
| 86 // and sections. | 86 // and sections. |
| 87 TEST_F(PrivacyCollectionViewControllerTest, TestModel) { | 87 // TODO(http://crbug.com/677121): reenable this test. |
| 88 TEST_F(PrivacyCollectionViewControllerTest, DISABLED_TestModel) { |
| 88 CheckController(); | 89 CheckController(); |
| 89 EXPECT_EQ(4, NumberOfSections()); | 90 EXPECT_EQ(4, NumberOfSections()); |
| 90 | 91 |
| 91 int sectionIndex = 0; | 92 int sectionIndex = 0; |
| 92 EXPECT_EQ(1, NumberOfItemsInSection(sectionIndex)); | 93 EXPECT_EQ(1, NumberOfItemsInSection(sectionIndex)); |
| 93 CheckSectionHeaderWithId(IDS_IOS_OPTIONS_CONTINUITY_LABEL, sectionIndex); | 94 CheckSectionHeaderWithId(IDS_IOS_OPTIONS_CONTINUITY_LABEL, sectionIndex); |
| 94 NSString* handoffSubtitle = chrome_browser_state_->GetPrefs()->GetBoolean( | 95 NSString* handoffSubtitle = chrome_browser_state_->GetPrefs()->GetBoolean( |
| 95 prefs::kIosHandoffToOtherDevices) | 96 prefs::kIosHandoffToOtherDevices) |
| 96 ? l10n_util::GetNSString(IDS_IOS_SETTING_ON) | 97 ? l10n_util::GetNSString(IDS_IOS_SETTING_ON) |
| 97 : l10n_util::GetNSString(IDS_IOS_SETTING_OFF); | 98 : l10n_util::GetNSString(IDS_IOS_SETTING_OFF); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 EXPECT_EQ(1, NumberOfItemsInSection(sectionIndex)); | 162 EXPECT_EQ(1, NumberOfItemsInSection(sectionIndex)); |
| 162 CheckSectionFooterWithId(IDS_IOS_OPTIONS_PRIVACY_FOOTER, sectionIndex); | 163 CheckSectionFooterWithId(IDS_IOS_OPTIONS_PRIVACY_FOOTER, sectionIndex); |
| 163 | 164 |
| 164 sectionIndex++; | 165 sectionIndex++; |
| 165 EXPECT_EQ(1, NumberOfItemsInSection(sectionIndex)); | 166 EXPECT_EQ(1, NumberOfItemsInSection(sectionIndex)); |
| 166 CheckTextCellTitle(l10n_util::GetNSString(IDS_IOS_CLEAR_BROWSING_DATA_TITLE), | 167 CheckTextCellTitle(l10n_util::GetNSString(IDS_IOS_CLEAR_BROWSING_DATA_TITLE), |
| 167 sectionIndex, 0); | 168 sectionIndex, 0); |
| 168 } | 169 } |
| 169 | 170 |
| 170 } // namespace | 171 } // namespace |
| OLD | NEW |