Chromium Code Reviews| Index: chrome/browser/sync/js_sync_manager_observer_unittest.cc |
| diff --git a/chrome/browser/sync/js_sync_manager_observer_unittest.cc b/chrome/browser/sync/js_sync_manager_observer_unittest.cc |
| index 11df4d594e354deeb56cccdf4cbfeac96c7f814e..e00e5d8ee79d285183e4772b291c661d39791261 100644 |
| --- a/chrome/browser/sync/js_sync_manager_observer_unittest.cc |
| +++ b/chrome/browser/sync/js_sync_manager_observer_unittest.cc |
| @@ -179,9 +179,9 @@ TEST_F(JsSyncManagerObserverTest, OnChangesApplied) { |
| // We don't test with passwords as that requires additional setup. |
| // Build a list of example ChangeRecords. |
| - sync_api::SyncManager::ChangeRecord changes[syncable::PASSWORDS]; |
| - for (int i = syncable::FIRST_REAL_MODEL_TYPE; |
| - i < syncable::PASSWORDS; ++i) { |
| + sync_api::SyncManager::ChangeRecord changes[syncable::MODEL_TYPE_COUNT]; |
| + for (int i = syncable::AUTOFILL_PROFILE; |
| + i < syncable::MODEL_TYPE_COUNT; ++i) { |
| changes[i].id = MakeNode(&share, syncable::ModelTypeFromInt(i)); |
| switch (i % 3) { |
| case 0: |
| @@ -206,17 +206,17 @@ TEST_F(JsSyncManagerObserverTest, OnChangesApplied) { |
| } |
| // Set expectations for each data type. |
| - for (int i = syncable::FIRST_REAL_MODEL_TYPE; |
| - i < syncable::PASSWORDS; ++i) { |
| + for (int i = syncable::AUTOFILL_PROFILE; |
| + i < syncable::MODEL_TYPE_COUNT; ++i) { |
| const std::string& model_type_str = |
| syncable::ModelTypeToString(syncable::ModelTypeFromInt(i)); |
| ListValue expected_args; |
| expected_args.Append(Value::CreateStringValue(model_type_str)); |
| ListValue* expected_changes = new ListValue(); |
| expected_args.Append(expected_changes); |
| - for (int j = i; j < syncable::PASSWORDS; ++j) { |
| + for (int j = i; j < syncable::MODEL_TYPE_COUNT; ++j) { |
| sync_api::ReadTransaction trans(&share); |
| - expected_changes->Append(changes[i].ToValue(&trans)); |
| + expected_changes->Append(changes[j].ToValue(&trans)); |
| } |
| EXPECT_CALL(mock_router_, |
| RouteJsEvent("onChangesApplied", |
| @@ -224,12 +224,12 @@ TEST_F(JsSyncManagerObserverTest, OnChangesApplied) { |
| } |
| // Fire OnChangesApplied() for each data type. |
|
Nicolas Zea
2011/02/18 06:09:52
A comment here about the fact that you're building
akalin
2011/02/18 08:12:29
Added comment, but above the expectations too sinc
|
| - for (int i = syncable::FIRST_REAL_MODEL_TYPE; |
| - i < syncable::PASSWORDS; ++i) { |
| + for (int i = syncable::AUTOFILL_PROFILE; |
| + i < syncable::MODEL_TYPE_COUNT; ++i) { |
| sync_api::ReadTransaction trans(&share); |
| sync_manager_observer_.OnChangesApplied(syncable::ModelTypeFromInt(i), |
| &trans, &changes[i], |
| - syncable::PASSWORDS - i); |
| + syncable::MODEL_TYPE_COUNT - i); |
| } |
| // |share.dir_manager| does not actually own its value. |