| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
| 6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
| 7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
| 16 #include "base/format_macros.h" | 16 #include "base/format_macros.h" |
| 17 #include "base/location.h" | 17 #include "base/location.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
| 20 #include "base/message_loop/message_loop_proxy.h" | |
| 21 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 22 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
| 23 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
| 24 #include "base/test/values_test_util.h" | 23 #include "base/test/values_test_util.h" |
| 25 #include "base/values.h" | 24 #include "base/values.h" |
| 26 #include "google_apis/gaia/gaia_constants.h" | 25 #include "google_apis/gaia/gaia_constants.h" |
| 27 #include "sync/engine/sync_scheduler.h" | 26 #include "sync/engine/sync_scheduler.h" |
| 28 #include "sync/internal_api/public/base/cancelation_signal.h" | 27 #include "sync/internal_api/public/base/cancelation_signal.h" |
| 29 #include "sync/internal_api/public/base/model_type_test_util.h" | 28 #include "sync/internal_api/public/base/model_type_test_util.h" |
| 30 #include "sync/internal_api/public/change_record.h" | 29 #include "sync/internal_api/public/change_record.h" |
| (...skipping 3097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 // SyncManagerInitInvalidStorageTest::GetFactory will return | 3127 // SyncManagerInitInvalidStorageTest::GetFactory will return |
| 3129 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. | 3128 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. |
| 3130 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's | 3129 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's |
| 3131 // task is to ensure that SyncManagerImpl reported initialization failure in | 3130 // task is to ensure that SyncManagerImpl reported initialization failure in |
| 3132 // OnInitializationComplete callback. | 3131 // OnInitializationComplete callback. |
| 3133 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { | 3132 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { |
| 3134 EXPECT_FALSE(initialization_succeeded_); | 3133 EXPECT_FALSE(initialization_succeeded_); |
| 3135 } | 3134 } |
| 3136 | 3135 |
| 3137 } // namespace syncer | 3136 } // namespace syncer |
| OLD | NEW |