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

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

Issue 8395029: Merge 106373 - Prevent crash by posting a task to call unrecoverable error handler. The task is p... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: '' 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/frontend_data_type_controller_unittest.cc
===================================================================
--- chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc (revision 107252)
+++ chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc (working copy)
@@ -129,6 +129,10 @@
EXPECT_CALL(start_callback_, Run(result,_));
}
+ void PumpLoop() {
+ message_loop_.RunAllPending();
+ }
+
MessageLoopForUI message_loop_;
BrowserThread ui_thread_;
scoped_refptr<FrontendDataTypeControllerFake> frontend_dtc_;
@@ -243,5 +247,6 @@
EXPECT_EQ(DataTypeController::RUNNING, frontend_dtc_->state());
// This should cause frontend_dtc_->Stop() to be called.
frontend_dtc_->OnUnrecoverableError(FROM_HERE, "Test");
+ PumpLoop();
EXPECT_EQ(DataTypeController::NOT_RUNNING, frontend_dtc_->state());
}

Powered by Google App Engine
This is Rietveld 408576698