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

Unified Diff: components/reading_list/core/reading_list_model_unittest.cc

Issue 2863303002: Fixes a DCHECK in tools_menu_button_observer_bridge during tests (Closed)
Patch Set: delete unnecessary implementation of Shutdown() Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/reading_list/core/reading_list_model_unittest.cc
diff --git a/components/reading_list/core/reading_list_model_unittest.cc b/components/reading_list/core/reading_list_model_unittest.cc
index a2b2b57fe4634fde0e989f6a97ed6bafd7cb0e2b..c79a63578dc12643dfaa0e2f6b918293fc76dbd3 100644
--- a/components/reading_list/core/reading_list_model_unittest.cc
+++ b/components/reading_list/core/reading_list_model_unittest.cc
@@ -314,6 +314,9 @@ TEST_F(ReadingListModelTest, EmptyLoaded) {
EXPECT_EQ(0ul, ReadSize());
model_->Shutdown();
EXPECT_FALSE(model_->loaded());
+ // Shutdown() does not delete the model observer. Verify that deleting the
+ // model will delete the model observer.
+ model_.reset();
AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0);
}

Powered by Google App Engine
This is Rietveld 408576698