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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 public: | 94 public: |
95 MockDelayProvider() : BackoffDelayProvider( | 95 MockDelayProvider() : BackoffDelayProvider( |
96 TimeDelta::FromSeconds(kInitialBackoffRetrySeconds), | 96 TimeDelta::FromSeconds(kInitialBackoffRetrySeconds), |
97 TimeDelta::FromSeconds(kInitialBackoffImmediateRetrySeconds)) { | 97 TimeDelta::FromSeconds(kInitialBackoffImmediateRetrySeconds)) { |
98 } | 98 } |
99 | 99 |
100 MOCK_METHOD1(GetDelay, TimeDelta(const TimeDelta&)); | 100 MOCK_METHOD1(GetDelay, TimeDelta(const TimeDelta&)); |
101 }; | 101 }; |
102 | 102 |
103 virtual void SetUp() { | 103 virtual void SetUp() { |
104 dir_maker_.SetUp(); | 104 dir_maker_.SetUp(NULL); |
105 syncer_ = new MockSyncer(); | 105 syncer_ = new MockSyncer(); |
106 delay_ = NULL; | 106 delay_ = NULL; |
107 | 107 |
108 routing_info_[BOOKMARKS] = GROUP_UI; | 108 routing_info_[BOOKMARKS] = GROUP_UI; |
109 routing_info_[AUTOFILL] = GROUP_DB; | 109 routing_info_[AUTOFILL] = GROUP_DB; |
110 routing_info_[THEMES] = GROUP_UI; | 110 routing_info_[THEMES] = GROUP_UI; |
111 routing_info_[NIGORI] = GROUP_PASSIVE; | 111 routing_info_[NIGORI] = GROUP_PASSIVE; |
112 | 112 |
113 workers_.clear(); | 113 workers_.clear(); |
114 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); | 114 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 // Before we run the scheduled canary, trigger a server connection change. | 1185 // Before we run the scheduled canary, trigger a server connection change. |
1186 connection()->SetServerReachable(); | 1186 connection()->SetServerReachable(); |
1187 connection()->UpdateConnectionStatus(); | 1187 connection()->UpdateConnectionStatus(); |
1188 scheduler()->OnConnectionStatusChange(); | 1188 scheduler()->OnConnectionStatusChange(); |
1189 scheduler()->ScheduleNudgeAsync( | 1189 scheduler()->ScheduleNudgeAsync( |
1190 zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(BOOKMARKS), FROM_HERE); | 1190 zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(BOOKMARKS), FROM_HERE); |
1191 MessageLoop::current()->RunUntilIdle(); | 1191 MessageLoop::current()->RunUntilIdle(); |
1192 } | 1192 } |
1193 | 1193 |
1194 } // namespace syncer | 1194 } // namespace syncer |
OLD | NEW |