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

Side by Side Diff: sync/sessions/sync_session_unittest.cc

Issue 14963002: sync: Report GetUpdate triggers to the server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review response: lots of renames Created 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/sessions/sync_session.h" 5 #include "sync/sessions/sync_session.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 15 matching lines...) Expand all
26 26
27 namespace sessions { 27 namespace sessions {
28 namespace { 28 namespace {
29 29
30 class SyncSessionTest : public testing::Test, 30 class SyncSessionTest : public testing::Test,
31 public SyncSession::Delegate { 31 public SyncSession::Delegate {
32 public: 32 public:
33 SyncSessionTest() : controller_invocations_allowed_(false) {} 33 SyncSessionTest() : controller_invocations_allowed_(false) {}
34 34
35 SyncSession* MakeSession() { 35 SyncSession* MakeSession() {
36 return new SyncSession(context_.get(), this, SyncSourceInfo()); 36 return SyncSession::BuildForNonNudge(context_.get(),
37 this,
38 SyncSourceInfo());
37 } 39 }
38 40
39 virtual void SetUp() { 41 virtual void SetUp() {
40 routes_.clear(); 42 routes_.clear();
41 routes_[BOOKMARKS] = GROUP_UI; 43 routes_[BOOKMARKS] = GROUP_UI;
42 routes_[AUTOFILL] = GROUP_DB; 44 routes_[AUTOFILL] = GROUP_DB;
43 scoped_refptr<ModelSafeWorker> passive_worker( 45 scoped_refptr<ModelSafeWorker> passive_worker(
44 new FakeModelWorker(GROUP_PASSIVE)); 46 new FakeModelWorker(GROUP_PASSIVE));
45 scoped_refptr<ModelSafeWorker> ui_worker( 47 scoped_refptr<ModelSafeWorker> ui_worker(
46 new FakeModelWorker(GROUP_UI)); 48 new FakeModelWorker(GROUP_UI));
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 189
188 ASSERT_EQ(3U, invalidation_map.size()); 190 ASSERT_EQ(3U, invalidation_map.size());
189 EXPECT_EQ(invalidation_map[BOOKMARKS].payload, payload); 191 EXPECT_EQ(invalidation_map[BOOKMARKS].payload, payload);
190 EXPECT_EQ(invalidation_map[PASSWORDS].payload, payload); 192 EXPECT_EQ(invalidation_map[PASSWORDS].payload, payload);
191 EXPECT_EQ(invalidation_map[AUTOFILL].payload, payload); 193 EXPECT_EQ(invalidation_map[AUTOFILL].payload, payload);
192 } 194 }
193 195
194 } // namespace 196 } // namespace
195 } // namespace sessions 197 } // namespace sessions
196 } // namespace syncer 198 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698