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> |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 // Takes ownership of |fake_invalidator_|. | 809 // Takes ownership of |fake_invalidator_|. |
810 sync_manager_.Init(temp_dir_.path(), | 810 sync_manager_.Init(temp_dir_.path(), |
811 WeakHandle<JsEventHandler>(), | 811 WeakHandle<JsEventHandler>(), |
812 "bogus", 0, false, | 812 "bogus", 0, false, |
813 scoped_ptr<HttpPostProviderFactory>( | 813 scoped_ptr<HttpPostProviderFactory>( |
814 new TestHttpPostProviderFactory()), | 814 new TestHttpPostProviderFactory()), |
815 workers, &extensions_activity_monitor_, this, | 815 workers, &extensions_activity_monitor_, this, |
816 credentials, | 816 credentials, |
817 scoped_ptr<Invalidator>(fake_invalidator_), | 817 scoped_ptr<Invalidator>(fake_invalidator_), |
| 818 "fake_invalidator_client_id", |
818 "", "", // bootstrap tokens | 819 "", "", // bootstrap tokens |
819 scoped_ptr<InternalComponentsFactory>(GetFactory()), | 820 scoped_ptr<InternalComponentsFactory>(GetFactory()), |
820 &encryptor_, | 821 &encryptor_, |
821 &handler_, | 822 &handler_, |
822 NULL); | 823 NULL); |
823 | 824 |
824 sync_manager_.GetEncryptionHandler()->AddObserver(&encryption_observer_); | 825 sync_manager_.GetEncryptionHandler()->AddObserver(&encryption_observer_); |
825 | 826 |
826 EXPECT_TRUE(js_backend_.IsInitialized()); | 827 EXPECT_TRUE(js_backend_.IsInitialized()); |
827 | 828 |
(...skipping 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3349 size_t folder_b_pos = | 3350 size_t folder_b_pos = |
3350 FindChangeInList(folder_b_id, ChangeRecord::ACTION_DELETE); | 3351 FindChangeInList(folder_b_id, ChangeRecord::ACTION_DELETE); |
3351 size_t child_pos = FindChangeInList(child_id, ChangeRecord::ACTION_DELETE); | 3352 size_t child_pos = FindChangeInList(child_id, ChangeRecord::ACTION_DELETE); |
3352 | 3353 |
3353 // Deletes should appear before updates. | 3354 // Deletes should appear before updates. |
3354 EXPECT_LT(child_pos, folder_a_pos); | 3355 EXPECT_LT(child_pos, folder_a_pos); |
3355 EXPECT_LT(folder_b_pos, folder_a_pos); | 3356 EXPECT_LT(folder_b_pos, folder_a_pos); |
3356 } | 3357 } |
3357 | 3358 |
3358 } // namespace | 3359 } // namespace |
OLD | NEW |