| Index: chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
|
| index d25ab6c328d5444831ecb771cb263af411f281a2..5b7742601976179c965bef6facb611f4d01788a9 100644
|
| --- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
|
| @@ -34,6 +34,7 @@
|
| #include "sync/internal_api/public/change_record.h"
|
| #include "sync/internal_api/public/read_node.h"
|
| #include "sync/internal_api/public/read_transaction.h"
|
| +#include "sync/internal_api/public/test/fake_sync_encryption_handler.h"
|
| #include "sync/internal_api/public/test/test_user_share.h"
|
| #include "sync/internal_api/public/write_node.h"
|
| #include "sync/internal_api/public/write_transaction.h"
|
| @@ -339,12 +340,20 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
|
|
|
| virtual void SetUp() {
|
| test_user_share_.SetUp();
|
| + SetUpEncryption();
|
| }
|
|
|
| virtual void TearDown() {
|
| test_user_share_.TearDown();
|
| }
|
|
|
| + void SetUpEncryption() {
|
| + syncer::ReadTransaction trans(FROM_HERE, test_user_share_.user_share());
|
| + fake_encryption_handler_.set_cryptographer(trans.GetCryptographer());
|
| + trans.GetCryptographer()->SetSyncEncryptionHandlerDelegate(
|
| + &fake_encryption_handler_);
|
| + }
|
| +
|
| // Load (or re-load) the bookmark model. |load| controls use of the
|
| // bookmarks file on disk. |save| controls whether the newly loaded
|
| // bookmark model will write out a bookmark file as it goes.
|
| @@ -559,6 +568,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
|
| syncer::TestUserShare test_user_share_;
|
| scoped_ptr<BookmarkChangeProcessor> change_processor_;
|
| StrictMock<DataTypeErrorHandlerMock> mock_error_handler_;
|
| + syncer::FakeSyncEncryptionHandler fake_encryption_handler_;
|
| };
|
|
|
| TEST_F(ProfileSyncServiceBookmarkTest, InitialState) {
|
| @@ -1467,8 +1477,8 @@ TEST_F(ProfileSyncServiceBookmarkTestWithData,
|
| StopSync();
|
|
|
| // Nuke the sync DB and reload.
|
| - test_user_share_.TearDown();
|
| - test_user_share_.SetUp();
|
| + TearDown();
|
| + SetUp();
|
|
|
| StartSync();
|
|
|
|
|