| 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);
|
|
|