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

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

Issue 15421011: Use OAuth2 token for sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 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 <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 &extensions_activity_monitor_, 831 &extensions_activity_monitor_,
832 this, 832 this,
833 credentials, 833 credentials,
834 scoped_ptr<Invalidator>(fake_invalidator_), 834 scoped_ptr<Invalidator>(fake_invalidator_),
835 "fake_invalidator_client_id", 835 "fake_invalidator_client_id",
836 std::string(), 836 std::string(),
837 std::string(), // bootstrap tokens 837 std::string(), // bootstrap tokens
838 scoped_ptr<InternalComponentsFactory>(GetFactory()), 838 scoped_ptr<InternalComponentsFactory>(GetFactory()),
839 &encryptor_, 839 &encryptor_,
840 &handler_, 840 &handler_,
841 NULL); 841 NULL,
842 false);
842 843
843 sync_manager_.GetEncryptionHandler()->AddObserver(&encryption_observer_); 844 sync_manager_.GetEncryptionHandler()->AddObserver(&encryption_observer_);
844 845
845 EXPECT_TRUE(js_backend_.IsInitialized()); 846 EXPECT_TRUE(js_backend_.IsInitialized());
846 847
847 for (ModelSafeRoutingInfo::iterator i = routing_info.begin(); 848 for (ModelSafeRoutingInfo::iterator i = routing_info.begin();
848 i != routing_info.end(); ++i) { 849 i != routing_info.end(); ++i) {
849 type_roots_[i->first] = MakeServerNodeForType( 850 type_roots_[i->first] = MakeServerNodeForType(
850 sync_manager_.GetUserShare(), i->first); 851 sync_manager_.GetUserShare(), i->first);
851 } 852 }
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
3575 size_t folder_b_pos = 3576 size_t folder_b_pos =
3576 FindChangeInList(folder_b_id, ChangeRecord::ACTION_DELETE); 3577 FindChangeInList(folder_b_id, ChangeRecord::ACTION_DELETE);
3577 size_t child_pos = FindChangeInList(child_id, ChangeRecord::ACTION_DELETE); 3578 size_t child_pos = FindChangeInList(child_id, ChangeRecord::ACTION_DELETE);
3578 3579
3579 // Deletes should appear before updates. 3580 // Deletes should appear before updates.
3580 EXPECT_LT(child_pos, folder_a_pos); 3581 EXPECT_LT(child_pos, folder_a_pos);
3581 EXPECT_LT(folder_b_pos, folder_a_pos); 3582 EXPECT_LT(folder_b_pos, folder_a_pos);
3582 } 3583 }
3583 3584
3584 } // namespace 3585 } // namespace
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/syncapi_server_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698