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

Side by Side Diff: components/sync_driver/model_association_manager_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/callback.h" 5 #include "base/callback.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "components/sync_driver/fake_data_type_controller.h" 7 #include "components/sync_driver/fake_data_type_controller.h"
8 #include "components/sync_driver/model_association_manager.h" 8 #include "components/sync_driver/model_association_manager.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 EXPECT_EQ(GetController(controllers_, syncer::BOOKMARKS)->state(), 332 EXPECT_EQ(GetController(controllers_, syncer::BOOKMARKS)->state(),
333 DataTypeController::ASSOCIATING); 333 DataTypeController::ASSOCIATING);
334 GetController(controllers_, syncer::BOOKMARKS)->FinishStart( 334 GetController(controllers_, syncer::BOOKMARKS)->FinishStart(
335 DataTypeController::OK); 335 DataTypeController::OK);
336 EXPECT_EQ(GetController(controllers_, syncer::BOOKMARKS)->state(), 336 EXPECT_EQ(GetController(controllers_, syncer::BOOKMARKS)->state(),
337 DataTypeController::RUNNING); 337 DataTypeController::RUNNING);
338 338
339 testing::Mock::VerifyAndClearExpectations(&delegate_); 339 testing::Mock::VerifyAndClearExpectations(&delegate_);
340 EXPECT_CALL(delegate_, 340 EXPECT_CALL(delegate_,
341 OnSingleDataTypeWillStop(syncer::BOOKMARKS, _)); 341 OnSingleDataTypeWillStop(syncer::BOOKMARKS, _));
342 syncer::SyncError error(FROM_HERE,
343 syncer::SyncError::DATATYPE_ERROR,
344 "error",
345 syncer::BOOKMARKS);
342 GetController(controllers_, syncer::BOOKMARKS) 346 GetController(controllers_, syncer::BOOKMARKS)
343 ->OnSingleDatatypeUnrecoverableError(FROM_HERE, "runtime error"); 347 ->OnSingleDataTypeUnrecoverableError(error);
344 } 348 }
345 349
346 } // namespace sync_driver 350 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/generic_change_processor.cc ('k') | components/sync_driver/non_ui_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698