| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_SYNC_ENGINE_SYNCER_COMMAND_TEST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ |
| 6 #define CHROME_TEST_SYNC_ENGINE_SYNCER_COMMAND_TEST_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "chrome/browser/sync/engine/model_safe_worker.h" | 14 #include "chrome/browser/sync/engine/model_safe_worker.h" |
| 15 #include "chrome/browser/sync/sessions/sync_session.h" | 15 #include "chrome/browser/sync/sessions/sync_session.h" |
| 16 #include "chrome/browser/sync/sessions/sync_session_context.h" | 16 #include "chrome/browser/sync/sessions/sync_session_context.h" |
| 17 #include "chrome/test/sync/engine/mock_connection_manager.h" | 17 #include "chrome/browser/sync/test/engine/mock_connection_manager.h" |
| 18 #include "chrome/test/sync/engine/test_directory_setter_upper.h" | 18 #include "chrome/browser/sync/test/engine/test_directory_setter_upper.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 namespace browser_sync { | 21 namespace browser_sync { |
| 22 | 22 |
| 23 // A test fixture that simplifies writing unit tests for individual | 23 // A test fixture that simplifies writing unit tests for individual |
| 24 // SyncerCommands, providing convenient access to a test directory | 24 // SyncerCommands, providing convenient access to a test directory |
| 25 // and a syncer session. | 25 // and a syncer session. |
| 26 template<typename T> | 26 template<typename T> |
| 27 class SyncerCommandTestWithParam : public testing::TestWithParam<T>, | 27 class SyncerCommandTestWithParam : public testing::TestWithParam<T>, |
| 28 public sessions::SyncSession::Delegate, | 28 public sessions::SyncSession::Delegate, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 MockDirectorySyncerCommandTest() | 160 MockDirectorySyncerCommandTest() |
| 161 : SyncerCommandTestWithParam<void*>( | 161 : SyncerCommandTestWithParam<void*>( |
| 162 SyncerCommandTestWithParam<void*>::USE_MOCK_DIRECTORY) {} | 162 SyncerCommandTestWithParam<void*>::USE_MOCK_DIRECTORY) {} |
| 163 MockDirectorySetterUpper::MockDirectory* mock_directory() { | 163 MockDirectorySetterUpper::MockDirectory* mock_directory() { |
| 164 return static_cast<MockDirectorySetterUpper*>(syncdb())->directory(); | 164 return static_cast<MockDirectorySetterUpper*>(syncdb())->directory(); |
| 165 } | 165 } |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace browser_sync | 168 } // namespace browser_sync |
| 169 | 169 |
| 170 #endif // CHROME_TEST_SYNC_ENGINE_SYNCER_COMMAND_TEST_H_ | 170 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ |
| OLD | NEW |