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

Unified Diff: components/sync/model_impl/shared_model_type_processor_unittest.cc

Issue 2621923004: [Sync] Fail softly in SMTP if an error occurs during startup. (Closed)
Patch Set: Created 3 years, 11 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/model_impl/shared_model_type_processor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model_impl/shared_model_type_processor_unittest.cc
diff --git a/components/sync/model_impl/shared_model_type_processor_unittest.cc b/components/sync/model_impl/shared_model_type_processor_unittest.cc
index 73dc7b1fef64fd96276779b3703b35edbaec10e7..ed58b826f831838e6ecab42a6e642abe1fe6316e 100644
--- a/components/sync/model_impl/shared_model_type_processor_unittest.cc
+++ b/components/sync/model_impl/shared_model_type_processor_unittest.cc
@@ -324,7 +324,7 @@ TEST_F(SharedModelTypeProcessorTest, NonInitialSync) {
}
// Test that an error during the merge is propagated to the error handler.
-TEST_F(SharedModelTypeProcessorTest, InitialError) {
+TEST_F(SharedModelTypeProcessorTest, MergeError) {
OnMetadataLoaded();
OnSyncStarting();
@@ -351,6 +351,21 @@ TEST_F(SharedModelTypeProcessorTest, StartErrors) {
InitializeToMetadataLoaded();
ExpectError();
OnSyncStarting();
+
+ // Test an error prior to metadata load.
+ ResetState(false);
+ type_processor()->ReportError(FROM_HERE, "boom");
+ ExpectError();
+ OnSyncStarting();
+ OnMetadataLoaded();
+
+ // Test an error prior to pending data load.
+ ResetStateWriteItem(kKey1, kValue1);
+ InitializeToMetadataLoaded();
+ type_processor()->ReportError(FROM_HERE, "boom");
+ ExpectError();
+ OnSyncStarting();
+ OnPendingCommitDataLoaded();
}
// This test covers race conditions during loading pending data. All cases
« no previous file with comments | « components/sync/model_impl/shared_model_type_processor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698