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

Unified Diff: components/sync_driver/ui_data_type_controller_unittest.cc

Issue 436733002: [Sync] Use OnSingleDataTypeUnrecoverableError for all errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/ui_data_type_controller_unittest.cc
diff --git a/components/sync_driver/ui_data_type_controller_unittest.cc b/components/sync_driver/ui_data_type_controller_unittest.cc
index e1b6356c1d6b0d0ab2b6d0324269bdb713f473ec..20bd3046e10622972c36689ac0f692037bf763df 100644
--- a/components/sync_driver/ui_data_type_controller_unittest.cc
+++ b/components/sync_driver/ui_data_type_controller_unittest.cc
@@ -31,17 +31,13 @@ class SyncUIDataTypeControllerTest : public testing::Test,
public:
SyncUIDataTypeControllerTest()
: type_(syncer::PREFERENCES),
- change_processor_(NULL),
- disable_callback_invoked_(false) {}
+ change_processor_(NULL) {}
virtual void SetUp() {
preference_dtc_ =
new UIDataTypeController(
base::MessageLoopProxy::current(),
base::Closure(),
- base::Bind(&SyncUIDataTypeControllerTest::DisableTypeCallback,
- base::Unretained(this),
- type_),
type_,
this);
SetStartExpectations();
@@ -89,13 +85,6 @@ class SyncUIDataTypeControllerTest : public testing::Test,
message_loop_.RunUntilIdle();
}
- void DisableTypeCallback(syncer::ModelType type,
- const tracked_objects::Location& location,
- const std::string& message) {
- disable_callback_invoked_ = true;
- preference_dtc_->Stop();
- }
-
base::MessageLoopForUI message_loop_;
const syncer::ModelType type_;
StartCallbackMock start_callback_;
@@ -103,7 +92,6 @@ class SyncUIDataTypeControllerTest : public testing::Test,
scoped_refptr<UIDataTypeController> preference_dtc_;
FakeGenericChangeProcessor* change_processor_;
syncer::FakeSyncableService syncable_service_;
- bool disable_callback_invoked_;
};
// Start the DTC. Verify that the callback is called with OK, the
@@ -200,7 +188,11 @@ TEST_F(SyncUIDataTypeControllerTest, OnSingleDatatypeUnrecoverableError) {
testing::Mock::VerifyAndClearExpectations(&start_callback_);
EXPECT_CALL(start_callback_, Run(DataTypeController::RUNTIME_ERROR, _, _));
- preference_dtc_->OnSingleDatatypeUnrecoverableError(FROM_HERE, "Test");
+ syncer::SyncError error(FROM_HERE,
+ syncer::SyncError::DATATYPE_ERROR,
+ "error",
+ syncer::PREFERENCES);
+ preference_dtc_->OnSingleDataTypeUnrecoverableError(error);
}
} // namespace
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698