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

Unified Diff: ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm

Issue 2592173002: Fix ios_chrome_unittests to crash on DCHECK failure. (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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm
diff --git a/ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm b/ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm
index 922bdd37a33512dc88ce0fdc7f8b7a0ce69d8370..09d7543e47f9aa6b1d96626cd4261168b0fd0e91 100644
--- a/ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm
+++ b/ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm
@@ -302,9 +302,9 @@ TEST(CollectionViewModelTest, InvalidIndexPath) {
[[CollectionViewModel alloc] init]);
[model addSectionWithIdentifier:SectionIdentifierCheese];
+ logging::SetLogAssertHandler(&LogSink);
bool out_of_bounds_exception_thrown = false;
@try {
- logging::SetLogAssertHandler(&LogSink);
[model indexInItemTypeForIndexPath:[NSIndexPath indexPathForItem:0
inSection:0]];
} @catch (NSException* exception) {
@@ -313,6 +313,7 @@ TEST(CollectionViewModelTest, InvalidIndexPath) {
}
}
EXPECT_TRUE(out_of_bounds_exception_thrown);
+ logging::SetLogAssertHandler(nullptr);
}
TEST(CollectionViewModelTest, RemoveItems) {

Powered by Google App Engine
This is Rietveld 408576698