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(), | |
55 std::vector<int>(MODEL_TYPE_COUNT,0), | 54 std::vector<int>(MODEL_TYPE_COUNT,0), |
56 std::vector<int>(MODEL_TYPE_COUNT, 0), | 55 std::vector<int>(MODEL_TYPE_COUNT, 0), |
57 sync_pb::GetUpdatesCallerInfo::UNKNOWN); | 56 sync_pb::GetUpdatesCallerInfo::UNKNOWN); |
58 scoped_ptr<base::DictionaryValue> value(snapshot.ToValue()); | 57 scoped_ptr<base::DictionaryValue> value(snapshot.ToValue()); |
59 EXPECT_EQ(16u, value->size()); | 58 EXPECT_EQ(16u, value->size()); |
60 ExpectDictIntegerValue(model_neutral.num_successful_commits, | 59 ExpectDictIntegerValue(model_neutral.num_successful_commits, |
61 *value, "numSuccessfulCommits"); | 60 *value, "numSuccessfulCommits"); |
62 ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits, | 61 ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits, |
63 *value, "numSuccessfulBookmarkCommits"); | 62 *value, "numSuccessfulBookmarkCommits"); |
64 ExpectDictIntegerValue(model_neutral.num_updates_downloaded_total, | 63 ExpectDictIntegerValue(model_neutral.num_updates_downloaded_total, |
(...skipping 14 matching lines...) Expand all Loading... |
79 ExpectDictIntegerValue(kNumHierarchyConflicts, *value, | 78 ExpectDictIntegerValue(kNumHierarchyConflicts, *value, |
80 "numHierarchyConflicts"); | 79 "numHierarchyConflicts"); |
81 ExpectDictIntegerValue(kNumServerConflicts, *value, | 80 ExpectDictIntegerValue(kNumServerConflicts, *value, |
82 "numServerConflicts"); | 81 "numServerConflicts"); |
83 ExpectDictBooleanValue(false, *value, "notificationsEnabled"); | 82 ExpectDictBooleanValue(false, *value, "notificationsEnabled"); |
84 } | 83 } |
85 | 84 |
86 } // namespace | 85 } // namespace |
87 } // namespace sessions | 86 } // namespace sessions |
88 } // namespace syncer | 87 } // namespace syncer |
OLD | NEW |