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

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

Issue 9978017: [Sync] - Upload the callstacks for errors so that the line number of error is in callstack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | chrome/browser/sync/glue/bookmark_model_associator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
index 701ffbd3eba53491b8662256a801fc9bf6eaa8da..f0068aedc3814276204901e1c6240252f7a0cf07 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -11,6 +11,7 @@
#include "base/message_loop.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/glue/bookmark_data_type_controller.h"
#include "chrome/browser/sync/glue/change_processor_mock.h"
#include "chrome/browser/sync/glue/data_type_controller_mock.h"
@@ -84,14 +85,15 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*profile_sync_factory_, CreateBookmarkSyncComponents(_, _));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels(_)).
- WillRepeatedly(Return(true));
+ EXPECT_CALL(*model_associator_, AssociateModels()).
+ WillRepeatedly(Return(SyncError()));
EXPECT_CALL(service_, ActivateDataType(_, _, _));
}
void SetStopExpectations() {
EXPECT_CALL(service_, DeactivateDataType(_));
- EXPECT_CALL(*model_associator_, DisassociateModels(_));
+ EXPECT_CALL(*model_associator_, DisassociateModels()).
+ WillOnce(Return(SyncError()));
}
MessageLoopForUI message_loop_;
@@ -205,9 +207,10 @@ TEST_F(SyncBookmarkDataTypeControllerTest, StartAssociationFailed) {
WillRepeatedly(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels(_)).
- WillRepeatedly(DoAll(browser_sync::SetSyncError(syncable::BOOKMARKS),
- Return(false)));
+ EXPECT_CALL(*model_associator_, AssociateModels()).
+ WillRepeatedly(Return(SyncError(FROM_HERE,
+ "error",
+ syncable::BOOKMARKS)));
EXPECT_CALL(start_callback_,
Run(DataTypeController::ASSOCIATION_FAILED, _));
« no previous file with comments | « no previous file | chrome/browser/sync/glue/bookmark_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698