| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "sync/internal_api/public/sessions/sync_session_snapshot.h" | 5 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/test/values_test_util.h" | 8 #include "base/test/values_test_util.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 SyncSessionSnapshot snapshot(model_neutral, | 45 SyncSessionSnapshot snapshot(model_neutral, |
| 46 download_progress_markers, | 46 download_progress_markers, |
| 47 kIsSilenced, | 47 kIsSilenced, |
| 48 kNumEncryptionConflicts, | 48 kNumEncryptionConflicts, |
| 49 kNumHierarchyConflicts, | 49 kNumHierarchyConflicts, |
| 50 kNumServerConflicts, | 50 kNumServerConflicts, |
| 51 false, | 51 false, |
| 52 0, | 52 0, |
| 53 base::Time::Now(), | 53 base::Time::Now(), |
| 54 base::Time::Now(), |
| 54 std::vector<int>(MODEL_TYPE_COUNT,0), | 55 std::vector<int>(MODEL_TYPE_COUNT,0), |
| 55 std::vector<int>(MODEL_TYPE_COUNT, 0), | 56 std::vector<int>(MODEL_TYPE_COUNT, 0), |
| 56 sync_pb::GetUpdatesCallerInfo::UNKNOWN); | 57 sync_pb::GetUpdatesCallerInfo::UNKNOWN); |
| 57 scoped_ptr<base::DictionaryValue> value(snapshot.ToValue()); | 58 scoped_ptr<base::DictionaryValue> value(snapshot.ToValue()); |
| 58 EXPECT_EQ(16u, value->size()); | 59 EXPECT_EQ(16u, value->size()); |
| 59 ExpectDictIntegerValue(model_neutral.num_successful_commits, | 60 ExpectDictIntegerValue(model_neutral.num_successful_commits, |
| 60 *value, "numSuccessfulCommits"); | 61 *value, "numSuccessfulCommits"); |
| 61 ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits, | 62 ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits, |
| 62 *value, "numSuccessfulBookmarkCommits"); | 63 *value, "numSuccessfulBookmarkCommits"); |
| 63 ExpectDictIntegerValue(model_neutral.num_updates_downloaded_total, | 64 ExpectDictIntegerValue(model_neutral.num_updates_downloaded_total, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 78 ExpectDictIntegerValue(kNumHierarchyConflicts, *value, | 79 ExpectDictIntegerValue(kNumHierarchyConflicts, *value, |
| 79 "numHierarchyConflicts"); | 80 "numHierarchyConflicts"); |
| 80 ExpectDictIntegerValue(kNumServerConflicts, *value, | 81 ExpectDictIntegerValue(kNumServerConflicts, *value, |
| 81 "numServerConflicts"); | 82 "numServerConflicts"); |
| 82 ExpectDictBooleanValue(false, *value, "notificationsEnabled"); | 83 ExpectDictBooleanValue(false, *value, "notificationsEnabled"); |
| 83 } | 84 } |
| 84 | 85 |
| 85 } // namespace | 86 } // namespace |
| 86 } // namespace sessions | 87 } // namespace sessions |
| 87 } // namespace syncer | 88 } // namespace syncer |
| OLD | NEW |