Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / shared_change_processor_unittest.cc
index 6f9afc5..46190b1 100644 (file)
@@ -14,6 +14,8 @@
 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
 #include "chrome/browser/sync/profile_sync_service_mock.h"
 #include "components/sync_driver/data_type_error_handler_mock.h"
+#include "components/sync_driver/generic_change_processor.h"
+#include "components/sync_driver/generic_change_processor_factory.h"
 #include "content/public/test/test_browser_thread.h"
 #include "sync/api/fake_syncable_service.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -104,9 +106,13 @@ class SyncSharedChangeProcessorTest : public testing::Test {
     DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
     EXPECT_CALL(sync_factory_, GetSyncableServiceForType(syncer::AUTOFILL)).
         WillOnce(GetWeakPtrToSyncableService(db_syncable_service_.get()));
+    syncer::UserShare share;
+    EXPECT_CALL(sync_service_, GetUserShare()).WillOnce(
+        ::testing::Return(&share));
     EXPECT_TRUE(shared_change_processor->Connect(
         &sync_factory_,
-        &sync_service_,
+        &processor_factory_,
+        sync_service_.GetUserShare(),
         &error_handler_,
         syncer::AUTOFILL,
         base::WeakPtr<syncer::SyncMergeResult>()));
@@ -122,6 +128,8 @@ class SyncSharedChangeProcessorTest : public testing::Test {
   NiceMock<ProfileSyncServiceMock> sync_service_;
   StrictMock<DataTypeErrorHandlerMock> error_handler_;
 
+  GenericChangeProcessorFactory processor_factory_;
+
   // Used only on DB thread.
   scoped_ptr<syncer::FakeSyncableService> db_syncable_service_;
 };