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

Side by Side Diff: components/sync/sessions/sync_session_snapshot_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
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 "components/sync/sessions/sync_session_snapshot.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/test/values_test_util.h" 10 #include "base/test/values_test_util.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 namespace sessions { 15 namespace sessions {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 SyncSessionSnapshot snapshot(model_neutral, download_progress_markers, 48 SyncSessionSnapshot snapshot(model_neutral, download_progress_markers,
49 kIsSilenced, kNumEncryptionConflicts, 49 kIsSilenced, kNumEncryptionConflicts,
50 kNumHierarchyConflicts, kNumServerConflicts, 50 kNumHierarchyConflicts, kNumServerConflicts,
51 false, 0, base::Time::Now(), base::Time::Now(), 51 false, 0, base::Time::Now(), base::Time::Now(),
52 std::vector<int>(MODEL_TYPE_COUNT, 0), 52 std::vector<int>(MODEL_TYPE_COUNT, 0),
53 std::vector<int>(MODEL_TYPE_COUNT, 0), 53 std::vector<int>(MODEL_TYPE_COUNT, 0),
54 sync_pb::GetUpdatesCallerInfo::UNKNOWN); 54 sync_pb::GetUpdatesCallerInfo::UNKNOWN);
55 std::unique_ptr<base::DictionaryValue> value(snapshot.ToValue()); 55 std::unique_ptr<base::DictionaryValue> value(snapshot.ToValue());
56 EXPECT_EQ(16u, value->size()); 56 EXPECT_EQ(16u, value->size());
57 ExpectDictIntegerValue(model_neutral.num_successful_commits, 57 ExpectDictIntegerValue(model_neutral.num_successful_commits, *value,
58 *value, "numSuccessfulCommits"); 58 "numSuccessfulCommits");
59 ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits, 59 ExpectDictIntegerValue(model_neutral.num_successful_bookmark_commits, *value,
60 *value, "numSuccessfulBookmarkCommits"); 60 "numSuccessfulBookmarkCommits");
61 ExpectDictIntegerValue(model_neutral.num_updates_downloaded_total, 61 ExpectDictIntegerValue(model_neutral.num_updates_downloaded_total, *value,
62 *value, "numUpdatesDownloadedTotal"); 62 "numUpdatesDownloadedTotal");
63 ExpectDictIntegerValue(model_neutral.num_tombstone_updates_downloaded_total, 63 ExpectDictIntegerValue(model_neutral.num_tombstone_updates_downloaded_total,
64 *value, "numTombstoneUpdatesDownloadedTotal"); 64 *value, "numTombstoneUpdatesDownloadedTotal");
65 ExpectDictIntegerValue(model_neutral.num_reflected_updates_downloaded_total, 65 ExpectDictIntegerValue(model_neutral.num_reflected_updates_downloaded_total,
66 *value, "numReflectedUpdatesDownloadedTotal"); 66 *value, "numReflectedUpdatesDownloadedTotal");
67 ExpectDictIntegerValue(model_neutral.num_local_overwrites, 67 ExpectDictIntegerValue(model_neutral.num_local_overwrites, *value,
68 *value, "numLocalOverwrites"); 68 "numLocalOverwrites");
69 ExpectDictIntegerValue(model_neutral.num_server_overwrites, 69 ExpectDictIntegerValue(model_neutral.num_server_overwrites, *value,
70 *value, "numServerOverwrites"); 70 "numServerOverwrites");
71 ExpectDictDictionaryValue(*expected_download_progress_markers_value, 71 ExpectDictDictionaryValue(*expected_download_progress_markers_value, *value,
72 *value, "downloadProgressMarkers"); 72 "downloadProgressMarkers");
73 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced"); 73 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced");
74 ExpectDictIntegerValue(kNumEncryptionConflicts, *value, 74 ExpectDictIntegerValue(kNumEncryptionConflicts, *value,
75 "numEncryptionConflicts"); 75 "numEncryptionConflicts");
76 ExpectDictIntegerValue(kNumHierarchyConflicts, *value, 76 ExpectDictIntegerValue(kNumHierarchyConflicts, *value,
77 "numHierarchyConflicts"); 77 "numHierarchyConflicts");
78 ExpectDictIntegerValue(kNumServerConflicts, *value, 78 ExpectDictIntegerValue(kNumServerConflicts, *value, "numServerConflicts");
79 "numServerConflicts");
80 ExpectDictBooleanValue(false, *value, "notificationsEnabled"); 79 ExpectDictBooleanValue(false, *value, "notificationsEnabled");
81 } 80 }
82 81
83 } // namespace 82 } // namespace
84 } // namespace sessions 83 } // namespace sessions
85 } // namespace syncer 84 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/sessions/sync_session_snapshot.cc ('k') | components/sync/sessions/type_debug_info_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698