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

Unified Diff: chrome/browser/sync/engine/apply_updates_command_unittest.cc

Issue 8917031: [Sync] Add nigori node conflict resolution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + pass trans/cryptographer directly through Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/engine/conflict_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/apply_updates_command_unittest.cc
diff --git a/chrome/browser/sync/engine/apply_updates_command_unittest.cc b/chrome/browser/sync/engine/apply_updates_command_unittest.cc
index a70f17ebf67ce4c96466090d5d86351f0e46fcb8..bd09da5954dc74f3fc8946271c26e7afb52e2895 100644
--- a/chrome/browser/sync/engine/apply_updates_command_unittest.cc
+++ b/chrome/browser/sync/engine/apply_updates_command_unittest.cc
@@ -712,28 +712,25 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) {
EXPECT_EQ(0, status->conflict_progress()->ConflictingItemsSize())
<< "The unsynced changes don't trigger a blocking conflict with the "
<< "nigori update.";
- EXPECT_EQ(1, status->conflict_progress()->NonblockingConflictingItemsSize())
- << "The unsynced changes trigger a non-blocking conflict with the "
+ EXPECT_EQ(0, status->conflict_progress()->NonblockingConflictingItemsSize())
+ << "The unsynced changes don't trigger a non-blocking conflict with the "
<< "nigori update.";
- EXPECT_EQ(0, status->update_progress()->SuccessfullyAppliedUpdateCount())
- << "The nigori update should not be applied";
+ EXPECT_EQ(1, status->update_progress()->SuccessfullyAppliedUpdateCount())
+ << "The nigori update should be applied";
EXPECT_FALSE(cryptographer->is_ready());
EXPECT_TRUE(cryptographer->has_pending_keys());
{
- // Ensure the unsynced nodes are still not encrypted.
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name());
ASSERT_TRUE(dir.good());
ReadTransaction trans(FROM_HERE, dir);
- // Since we're in conflict, the specifics don't reflect the unapplied
- // changes.
+ // Since we have pending keys, we would have failed to encrypt, but the
+ // cryptographer should be updated.
EXPECT_FALSE(VerifyUnsyncedChangesAreEncrypted(&trans, encrypted_types));
- encrypted_types.Clear();
- encrypted_types.Put(syncable::PASSWORDS);
- encrypted_types.Put(syncable::BOOKMARKS);
- EXPECT_TRUE(
- cryptographer->GetEncryptedTypes().Equals(
- syncable::ModelTypeSet().All()));
+ EXPECT_TRUE(cryptographer->GetEncryptedTypes().Equals(
+ syncable::ModelTypeSet().All()));
+ EXPECT_FALSE(cryptographer->is_ready());
+ EXPECT_TRUE(cryptographer->has_pending_keys());
Syncer::UnsyncedMetaHandles handles;
SyncerUtil::GetUnsyncedEntries(&trans, &handles);
« no previous file with comments | « no previous file | chrome/browser/sync/engine/conflict_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698