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

Side by Side Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 12847003: Separate invalidator and sync client ID (part 2/2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_listen_notifications utility Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/test/fake_sync_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/test/fake_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698