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

Side by Side Diff: sync/engine/apply_control_data_updates_unittest.cc

Issue 302173004: sync: Specialize functions that fetch type root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GET_BY_SERVER_TAG_DEPRECATED/GET_BY_SERVER_TAG/ Created 6 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 | Annotate | Revision Log
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 #include "base/format_macros.h" 5 #include "base/format_macros.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "sync/engine/apply_control_data_updates.h" 10 #include "sync/engine/apply_control_data_updates.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_TRUE(VerifyUnsyncedChangesAreEncrypted(&trans, encrypted_types)); 181 EXPECT_TRUE(VerifyUnsyncedChangesAreEncrypted(&trans, encrypted_types));
182 182
183 Syncer::UnsyncedMetaHandles handles; 183 Syncer::UnsyncedMetaHandles handles;
184 GetUnsyncedEntries(&trans, &handles); 184 GetUnsyncedEntries(&trans, &handles);
185 EXPECT_EQ(2*batch_s+1, handles.size()); 185 EXPECT_EQ(2*batch_s+1, handles.size());
186 } 186 }
187 187
188 // Simulate another nigori update that doesn't change anything. 188 // Simulate another nigori update that doesn't change anything.
189 { 189 {
190 syncable::WriteTransaction trans(FROM_HERE, UNITTEST, directory()); 190 syncable::WriteTransaction trans(FROM_HERE, UNITTEST, directory());
191 MutableEntry entry(&trans, syncable::GET_BY_SERVER_TAG, 191 MutableEntry entry(&trans, syncable::GET_TYPE_ROOT, NIGORI);
192 ModelTypeToRootTag(NIGORI));
193 ASSERT_TRUE(entry.good()); 192 ASSERT_TRUE(entry.good());
194 entry.PutServerVersion(entry_factory_->GetNextRevision()); 193 entry.PutServerVersion(entry_factory_->GetNextRevision());
195 entry.PutIsUnappliedUpdate(true); 194 entry.PutIsUnappliedUpdate(true);
196 } 195 }
197 196
198 ApplyControlDataUpdates(directory()); 197 ApplyControlDataUpdates(directory());
199 198
200 EXPECT_FALSE(cryptographer->has_pending_keys()); 199 EXPECT_FALSE(cryptographer->has_pending_keys());
201 EXPECT_TRUE(cryptographer->is_ready()); 200 EXPECT_TRUE(cryptographer->is_ready());
202 { 201 {
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 local_specifics); 910 local_specifics);
912 ApplyControlDataUpdates(directory()); 911 ApplyControlDataUpdates(directory());
913 912
914 EXPECT_FALSE(entry_factory_->GetIsUnappliedForItem(experiment_handle)); 913 EXPECT_FALSE(entry_factory_->GetIsUnappliedForItem(experiment_handle));
915 EXPECT_TRUE( 914 EXPECT_TRUE(
916 entry_factory_->GetLocalSpecificsForItem(experiment_handle). 915 entry_factory_->GetLocalSpecificsForItem(experiment_handle).
917 experiments().keystore_encryption().enabled()); 916 experiments().keystore_encryption().enabled());
918 } 917 }
919 918
920 } // namespace syncer 919 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/apply_control_data_updates.cc ('k') | sync/engine/directory_commit_contribution_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698