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

Side by Side Diff: sync/internal_api/js_sync_manager_observer_unittest.cc

Issue 19982002: sync: Remove SyncSourceInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert SyncShareRecords to typedef Created 7 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 | Annotate | Revision Log
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/js_sync_manager_observer.h" 5 #include "sync/internal_api/js_sync_manager_observer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { 77 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
78 sessions::SyncSessionSnapshot snapshot( 78 sessions::SyncSessionSnapshot snapshot(
79 sessions::ModelNeutralState(), 79 sessions::ModelNeutralState(),
80 ProgressMarkerMap(), 80 ProgressMarkerMap(),
81 false, 81 false,
82 5, 82 5,
83 2, 83 2,
84 7, 84 7,
85 sessions::SyncSourceInfo(),
86 false, 85 false,
87 0, 86 0,
88 base::Time::Now(), 87 base::Time::Now(),
89 std::vector<int>(MODEL_TYPE_COUNT, 0), 88 std::vector<int>(MODEL_TYPE_COUNT, 0),
90 std::vector<int>(MODEL_TYPE_COUNT, 0)); 89 std::vector<int>(MODEL_TYPE_COUNT, 0),
90 sync_pb::GetUpdatesCallerInfo::UNKNOWN);
91 base::DictionaryValue expected_details; 91 base::DictionaryValue expected_details;
92 expected_details.Set("snapshot", snapshot.ToValue()); 92 expected_details.Set("snapshot", snapshot.ToValue());
93 93
94 EXPECT_CALL(mock_js_event_handler_, 94 EXPECT_CALL(mock_js_event_handler_,
95 HandleJsEvent("onSyncCycleCompleted", 95 HandleJsEvent("onSyncCycleCompleted",
96 HasDetailsAsDictionary(expected_details))); 96 HasDetailsAsDictionary(expected_details)));
97 97
98 js_sync_manager_observer_.OnSyncCycleCompleted(snapshot); 98 js_sync_manager_observer_.OnSyncCycleCompleted(snapshot);
99 PumpLoop(); 99 PumpLoop();
100 } 100 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 EXPECT_CALL(mock_js_event_handler_, 138 EXPECT_CALL(mock_js_event_handler_,
139 HandleJsEvent("onUpdatedToken", 139 HandleJsEvent("onUpdatedToken",
140 HasDetailsAsDictionary(redacted_token_details))); 140 HasDetailsAsDictionary(redacted_token_details)));
141 141
142 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); 142 js_sync_manager_observer_.OnUpdatedToken("sensitive_token");
143 PumpLoop(); 143 PumpLoop();
144 } 144 }
145 145
146 } // namespace 146 } // namespace
147 } // namespace syncer 147 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/debug_info_event_listener.cc ('k') | sync/internal_api/public/sessions/model_neutral_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698