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

Side by Side Diff: ios/chrome/browser/ui/history/history_entry_inserter_unittest.mm

Issue 2746893002: Disable HistoryEntryInserterTest.AddSection unit test (Closed)
Patch Set: Created 3 years, 9 months 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 | no next file » | 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 #import "ios/chrome/browser/ui/history/history_entry_inserter.h" 5 #import "ios/chrome/browser/ui/history/history_entry_inserter.h"
6 6
7 #import "base/mac/foundation_util.h" 7 #import "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 [model_ itemsInSectionWithIdentifier:kSectionIdentifierEnumZero + 1]); 88 [model_ itemsInSectionWithIdentifier:kSectionIdentifierEnumZero + 1]);
89 EXPECT_NSEQ(@"entry1", section_1[0].text); 89 EXPECT_NSEQ(@"entry1", section_1[0].text);
90 EXPECT_NSEQ(@"entry2", section_1[1].text); 90 EXPECT_NSEQ(@"entry2", section_1[1].text);
91 EXPECT_NSEQ(@"entry3", section_1[2].text); 91 EXPECT_NSEQ(@"entry3", section_1[2].text);
92 EXPECT_OCMOCK_VERIFY(mock_delegate); 92 EXPECT_OCMOCK_VERIFY(mock_delegate);
93 } 93 }
94 94
95 // Tests that items from different dates are added in correctly ordered 95 // Tests that items from different dates are added in correctly ordered
96 // sections. 96 // sections.
97 TEST_F(HistoryEntryInserterTest, AddSections) { 97 TEST_F(HistoryEntryInserterTest, AddSections) {
98 // TODO(crbug.com/700814): Reneable it.
99 return;
noyau (Ping after 24h) 2017/03/13 09:23:17 To turn it off you should just have to rename the
gambard 2017/03/13 09:25:40 Ooops! Done
98 base::Time today = 100 base::Time today =
99 base::Time::Now().LocalMidnight() + base::TimeDelta::FromHours(1); 101 base::Time::Now().LocalMidnight() + base::TimeDelta::FromHours(1);
100 base::TimeDelta day = base::TimeDelta::FromDays(1); 102 base::TimeDelta day = base::TimeDelta::FromDays(1);
101 base::TimeDelta minute = base::TimeDelta::FromMinutes(1); 103 base::TimeDelta minute = base::TimeDelta::FromMinutes(1);
102 HistoryEntryItem* day1 = TestHistoryEntryItem(today, "day1"); 104 HistoryEntryItem* day1 = TestHistoryEntryItem(today, "day1");
103 HistoryEntryItem* day2_entry1 = 105 HistoryEntryItem* day2_entry1 =
104 TestHistoryEntryItem(today - day, "day2_entry1"); 106 TestHistoryEntryItem(today - day, "day2_entry1");
105 HistoryEntryItem* day2_entry2 = 107 HistoryEntryItem* day2_entry2 =
106 TestHistoryEntryItem(today - day - minute, "day2_entry2"); 108 TestHistoryEntryItem(today - day - minute, "day2_entry2");
107 HistoryEntryItem* day3 = TestHistoryEntryItem(today - 2 * day, "day3"); 109 HistoryEntryItem* day3 = TestHistoryEntryItem(today - 2 * day, "day3");
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Empty the section for day 1, and remove the section. 249 // Empty the section for day 1, and remove the section.
248 [model_ removeItemWithType:kItemTypeEnumZero 250 [model_ removeItemWithType:kItemTypeEnumZero
249 fromSectionWithIdentifier:day1_identifier]; 251 fromSectionWithIdentifier:day1_identifier];
250 [[mock_delegate expect] historyEntryInserter:inserter_ 252 [[mock_delegate expect] historyEntryInserter:inserter_
251 didRemoveSectionAtIndex:1]; 253 didRemoveSectionAtIndex:1];
252 [inserter_ removeSection:1]; 254 [inserter_ removeSection:1];
253 255
254 EXPECT_EQ(2, [model_ numberOfSections]); 256 EXPECT_EQ(2, [model_ numberOfSections]);
255 EXPECT_OCMOCK_VERIFY(mock_delegate); 257 EXPECT_OCMOCK_VERIFY(mock_delegate);
256 } 258 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698