summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/syncable
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 08:57:51 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 08:57:51 +0000
commit452b2d089a56abcedb8ee0749971f501997ba687 (patch)
tree10b2ed0b1793eda6aea5db112f37bd7ba40d0bcf /webkit/fileapi/syncable
parent4f0501b5849de6f8b4cadc6d91b9419abd4582c3 (diff)
downloadchromium_src-452b2d089a56abcedb8ee0749971f501997ba687.zip
chromium_src-452b2d089a56abcedb8ee0749971f501997ba687.tar.gz
chromium_src-452b2d089a56abcedb8ee0749971f501997ba687.tar.bz2
Add MockLocalChangeProcessor class and default implementation
Moved MockLocalChangeProcessor local implementation from local_file_sync_service_unittest.cc into its own file and added default implementation of MockRemoteFileSyncService::GetLocalChangeProcessor using the mock class. Similarly separating out MockSyncStatusObserver class into its own class. BUG=161436 TEST=LocalFileSyncServiceTest.* Review URL: https://codereview.chromium.org/11414108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/syncable')
-rw-r--r--webkit/fileapi/syncable/mock_sync_status_observer.cc15
-rw-r--r--webkit/fileapi/syncable/mock_sync_status_observer.h28
2 files changed, 43 insertions, 0 deletions
diff --git a/webkit/fileapi/syncable/mock_sync_status_observer.cc b/webkit/fileapi/syncable/mock_sync_status_observer.cc
new file mode 100644
index 0000000..80ae893
--- /dev/null
+++ b/webkit/fileapi/syncable/mock_sync_status_observer.cc
@@ -0,0 +1,15 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/fileapi/syncable/mock_sync_status_observer.h"
+
+namespace fileapi {
+
+MockSyncStatusObserver::MockSyncStatusObserver() {
+}
+
+MockSyncStatusObserver::~MockSyncStatusObserver() {
+}
+
+} // namespace fileapi
diff --git a/webkit/fileapi/syncable/mock_sync_status_observer.h b/webkit/fileapi/syncable/mock_sync_status_observer.h
new file mode 100644
index 0000000..59c89b3
--- /dev/null
+++ b/webkit/fileapi/syncable/mock_sync_status_observer.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_FILEAPI_SYNCABLE_MOCK_SYNC_STATUS_OBSERVER_H_
+#define WEBKIT_FILEAPI_SYNCABLE_MOCK_SYNC_STATUS_OBSERVER_H_
+
+#include "testing/gmock/include/gmock/gmock.h"
+#include "webkit/fileapi/syncable/local_file_sync_status.h"
+
+namespace fileapi {
+
+class MockSyncStatusObserver : public LocalFileSyncStatus::Observer {
+ public:
+ MockSyncStatusObserver();
+ virtual ~MockSyncStatusObserver();
+
+ // LocalFileSyncStatus::Observer overrides.
+ MOCK_METHOD1(OnSyncEnabled, void(const FileSystemURL& url));
+ MOCK_METHOD1(OnWriteEnabled, void(const FileSystemURL& url));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockSyncStatusObserver);
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_FILEAPI_SYNCABLE_MOCK_SYNC_STATUS_OBSERVER_H_