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

Side by Side Diff: sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc

Issue 1144443004: Revert of [Sync] Refactoring polling to be reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 "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
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
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
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/sync_session_snapshot.cc ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698