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

Side by Side Diff: chrome/browser/sync/profile_sync_service_bookmark_unittest.cc

Issue 10553042: sync: don't make DataTypeErrorHandler inherit UnrecoverableErrorHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(akalin): This file is basically just a unit test for 5 // TODO(akalin): This file is basically just a unit test for
6 // BookmarkChangeProcessor. Write unit tests for 6 // BookmarkChangeProcessor. Write unit tests for
7 // BookmarkModelAssociator separately. 7 // BookmarkModelAssociator separately.
8 8
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 905
906 // Verify that the browser model matches the sync model. 906 // Verify that the browser model matches the sync model.
907 EXPECT_EQ(model_->other_node()->child_count(), count); 907 EXPECT_EQ(model_->other_node()->child_count(), count);
908 ExpectModelMatch(); 908 ExpectModelMatch();
909 } 909 }
910 910
911 // Introduce a consistency violation into the model, and see that it 911 // Introduce a consistency violation into the model, and see that it
912 // puts itself into a lame, error state. 912 // puts itself into a lame, error state.
913 TEST_F(ProfileSyncServiceBookmarkTest, UnrecoverableErrorSuspendsService) { 913 TEST_F(ProfileSyncServiceBookmarkTest, UnrecoverableErrorSuspendsService) {
914 EXPECT_CALL(mock_error_handler_, 914 EXPECT_CALL(mock_error_handler_,
915 OnUnrecoverableError(_, _)); 915 OnSingleDatatypeUnrecoverableError(_, _));
916 916
917 LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE); 917 LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE);
918 StartSync(); 918 StartSync();
919 919
920 // Add a node which will be the target of the consistency violation. 920 // Add a node which will be the target of the consistency violation.
921 const BookmarkNode* node = 921 const BookmarkNode* node =
922 model_->AddFolder(model_->other_node(), 0, ASCIIToUTF16("node")); 922 model_->AddFolder(model_->other_node(), 0, ASCIIToUTF16("node"));
923 ExpectSyncerNodeMatching(node); 923 ExpectSyncerNodeMatching(node);
924 924
925 // Now destroy the syncer node as if we were the ProfileSyncService without 925 // Now destroy the syncer node as if we were the ProfileSyncService without
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 EXPECT_EQ(1, observer.get_started()); 1490 EXPECT_EQ(1, observer.get_started());
1491 EXPECT_EQ(0, observer.get_completed_count_at_started()); 1491 EXPECT_EQ(0, observer.get_completed_count_at_started());
1492 EXPECT_EQ(1, observer.get_completed()); 1492 EXPECT_EQ(1, observer.get_completed());
1493 1493
1494 model_->RemoveObserver(&observer); 1494 model_->RemoveObserver(&observer);
1495 } 1495 }
1496 1496
1497 } // namespace 1497 } // namespace
1498 1498
1499 } // namespace browser_sync 1499 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698