summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/syncable
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync/syncable')
-rw-r--r--chrome/browser/sync/syncable/syncable_mock.cc16
-rw-r--r--chrome/browser/sync/syncable/syncable_mock.h10
2 files changed, 20 insertions, 6 deletions
diff --git a/chrome/browser/sync/syncable/syncable_mock.cc b/chrome/browser/sync/syncable/syncable_mock.cc
new file mode 100644
index 0000000..83851cf
--- /dev/null
+++ b/chrome/browser/sync/syncable/syncable_mock.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2011 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 "chrome/browser/sync/syncable/syncable_mock.h"
+
+MockDirectory::MockDirectory() {
+ init_kernel("myk");
+}
+
+MockDirectory::~MockDirectory() {}
+
+MockSyncableWriteTransaction::MockSyncableWriteTransaction(
+ Directory *directory)
+ : WriteTransaction(directory, syncable::UNITTEST, "dontcare.cpp", 25) {
+}
diff --git a/chrome/browser/sync/syncable/syncable_mock.h b/chrome/browser/sync/syncable/syncable_mock.h
index 9412fe0..e6e0912 100644
--- a/chrome/browser/sync/syncable/syncable_mock.h
+++ b/chrome/browser/sync/syncable/syncable_mock.h
@@ -17,9 +17,9 @@ using syncable::EntryKernel;
class MockDirectory : public Directory {
public:
- MockDirectory() {
- init_kernel("myk");
- }
+ MockDirectory();
+ virtual ~MockDirectory();
+
MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64));
MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64));
@@ -30,9 +30,7 @@ class MockDirectory : public Directory {
class MockSyncableWriteTransaction : public syncable::WriteTransaction {
public:
- explicit MockSyncableWriteTransaction(Directory *directory) :
- WriteTransaction(directory, syncable::UNITTEST, "dontcare.cpp", 25) {
- }
+ explicit MockSyncableWriteTransaction(Directory *directory);
};