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

Unified Diff: chrome/browser/sync/glue/preference_data_type_controller_unittest.cc

Issue 8345026: Prevent crash on unrecoverable error method call on FrontendDataTypeControllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 9 years, 2 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: chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
index 78f01cb31344cac14776148d6cab89884aa1dac5..99f45f2da2457b214c492a5b8d78ebbd5f2f5200 100644
--- a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
@@ -70,6 +70,10 @@ class PreferenceDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*model_associator_, DisassociateModels(_));
}
+ void PumpLoop() {
+ message_loop_.RunAllPending();
+ }
+
MessageLoopForUI message_loop_;
BrowserThread ui_thread_;
scoped_refptr<PreferenceDataTypeController> preference_dtc_;
@@ -167,4 +171,5 @@ TEST_F(PreferenceDataTypeControllerTest, OnUnrecoverableError) {
preference_dtc_->Start(NewCallback(&start_callback_, &StartCallback::Run));
// This should cause preference_dtc_->Stop() to be called.
preference_dtc_->OnUnrecoverableError(FROM_HERE, "Test");
+ PumpLoop();
}

Powered by Google App Engine
This is Rietveld 408576698