Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: components/sync/core_impl/sync_manager_impl_unittest.cc

Issue 2245073003: [Sync] Clean up intra-sync DEPS significantly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments/fix test. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/sync/core_impl/sync_manager_impl.h" 9 #include "components/sync/core_impl/sync_manager_impl.h"
10 10
(...skipping 12 matching lines...) Expand all
23 #include "base/run_loop.h" 23 #include "base/run_loop.h"
24 #include "base/strings/string_number_conversions.h" 24 #include "base/strings/string_number_conversions.h"
25 #include "base/strings/stringprintf.h" 25 #include "base/strings/stringprintf.h"
26 #include "base/strings/utf_string_conversions.h" 26 #include "base/strings/utf_string_conversions.h"
27 #include "base/test/values_test_util.h" 27 #include "base/test/values_test_util.h"
28 #include "base/values.h" 28 #include "base/values.h"
29 #include "components/sync/base/attachment_id_proto.h" 29 #include "components/sync/base/attachment_id_proto.h"
30 #include "components/sync/base/cancelation_signal.h" 30 #include "components/sync/base/cancelation_signal.h"
31 #include "components/sync/base/cryptographer.h" 31 #include "components/sync/base/cryptographer.h"
32 #include "components/sync/base/extensions_activity.h" 32 #include "components/sync/base/extensions_activity.h"
33 #include "components/sync/base/fake_encryptor.h"
33 #include "components/sync/base/mock_unrecoverable_error_handler.h" 34 #include "components/sync/base/mock_unrecoverable_error_handler.h"
34 #include "components/sync/base/model_type_test_util.h" 35 #include "components/sync/base/model_type_test_util.h"
35 #include "components/sync/base/time.h" 36 #include "components/sync/base/time.h"
36 #include "components/sync/core/change_record.h" 37 #include "components/sync/core/change_record.h"
37 #include "components/sync/core/http_post_provider_factory.h" 38 #include "components/sync/core/http_post_provider_factory.h"
38 #include "components/sync/core/http_post_provider_interface.h" 39 #include "components/sync/core/http_post_provider_interface.h"
39 #include "components/sync/core/read_node.h" 40 #include "components/sync/core/read_node.h"
40 #include "components/sync/core/read_transaction.h" 41 #include "components/sync/core/read_transaction.h"
41 #include "components/sync/core/test/test_entry_factory.h" 42 #include "components/sync/core/test/test_entry_factory.h"
42 #include "components/sync/core/test/test_internal_components_factory.h" 43 #include "components/sync/core/test/test_internal_components_factory.h"
(...skipping 22 matching lines...) Expand all
65 #include "components/sync/syncable/mutable_entry.h" 66 #include "components/sync/syncable/mutable_entry.h"
66 #include "components/sync/syncable/nigori_util.h" 67 #include "components/sync/syncable/nigori_util.h"
67 #include "components/sync/syncable/syncable_id.h" 68 #include "components/sync/syncable/syncable_id.h"
68 #include "components/sync/syncable/syncable_read_transaction.h" 69 #include "components/sync/syncable/syncable_read_transaction.h"
69 #include "components/sync/syncable/syncable_util.h" 70 #include "components/sync/syncable/syncable_util.h"
70 #include "components/sync/syncable/syncable_write_transaction.h" 71 #include "components/sync/syncable/syncable_write_transaction.h"
71 #include "components/sync/test/callback_counter.h" 72 #include "components/sync/test/callback_counter.h"
72 #include "components/sync/test/engine/fake_model_worker.h" 73 #include "components/sync/test/engine/fake_model_worker.h"
73 #include "components/sync/test/engine/fake_sync_scheduler.h" 74 #include "components/sync/test/engine/fake_sync_scheduler.h"
74 #include "components/sync/test/engine/test_id_factory.h" 75 #include "components/sync/test/engine/test_id_factory.h"
75 #include "components/sync/test/fake_encryptor.h"
76 #include "google_apis/gaia/gaia_constants.h" 76 #include "google_apis/gaia/gaia_constants.h"
77 #include "testing/gmock/include/gmock/gmock.h" 77 #include "testing/gmock/include/gmock/gmock.h"
78 #include "testing/gtest/include/gtest/gtest.h" 78 #include "testing/gtest/include/gtest/gtest.h"
79 #include "third_party/protobuf/src/google/protobuf/io/coded_stream.h" 79 #include "third_party/protobuf/src/google/protobuf/io/coded_stream.h"
80 #include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite .h" 80 #include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite .h"
81 #include "url/gurl.h" 81 #include "url/gurl.h"
82 82
83 using base::ExpectDictStringValue; 83 using base::ExpectDictStringValue;
84 using testing::_; 84 using testing::_;
85 using testing::DoAll; 85 using testing::DoAll;
(...skipping 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after
3342 // SyncManagerInitInvalidStorageTest::GetFactory will return 3342 // SyncManagerInitInvalidStorageTest::GetFactory will return
3343 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. 3343 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails.
3344 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's 3344 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's
3345 // task is to ensure that SyncManagerImpl reported initialization failure in 3345 // task is to ensure that SyncManagerImpl reported initialization failure in
3346 // OnInitializationComplete callback. 3346 // OnInitializationComplete callback.
3347 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { 3347 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) {
3348 EXPECT_FALSE(initialization_succeeded_); 3348 EXPECT_FALSE(initialization_succeeded_);
3349 } 3349 }
3350 3350
3351 } // namespace syncer 3351 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698