Home | History | Annotate | Download | only in engine
      1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_MOCK_H_
      6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_MOCK_H_
      7 #pragma once
      8 
      9 #include "chrome/browser/sync/engine/syncapi.h"
     10 #include "chrome/browser/sync/syncable/syncable.h"
     11 #include "chrome/browser/sync/syncable/syncable_mock.h"
     12 #include "testing/gmock/include/gmock/gmock.h"
     13 #include "testing/gtest/include/gtest/gtest.h"
     14 
     15 using sync_api::WriteTransaction;
     16 
     17 class MockWriteTransaction : public sync_api::WriteTransaction {
     18  public:
     19   explicit MockWriteTransaction(Directory* directory)
     20      : sync_api::WriteTransaction() {
     21     this->SetTransaction(new MockSyncableWriteTransaction(directory));
     22   }
     23 };
     24 
     25 #endif  // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_MOCK_H_
     26 
     27