OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/thread.h" | 8 #include "base/thread.h" |
9 #include "base/waitable_event.h" | 9 #include "base/waitable_event.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 if (num_total == num_complete) | 209 if (num_total == num_complete) |
210 EXPECT_TRUE(url.is_empty()); | 210 EXPECT_TRUE(url.is_empty()); |
211 else | 211 else |
212 EXPECT_TRUE(url.is_valid()); | 212 EXPECT_TRUE(url.is_valid()); |
213 | 213 |
214 last_progress_total_ = num_total; | 214 last_progress_total_ = num_total; |
215 last_progress_complete_ = num_complete; | 215 last_progress_complete_ = num_complete; |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
| 219 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
| 220 const std::string& message) { |
| 221 } |
| 222 |
219 virtual void OnContentBlocked(int host_id) { | 223 virtual void OnContentBlocked(int host_id) { |
220 } | 224 } |
221 | 225 |
222 void AddExpectedEvent(const std::vector<int>& host_ids, EventID event_id) { | 226 void AddExpectedEvent(const std::vector<int>& host_ids, EventID event_id) { |
223 DCHECK(!ignore_progress_events_ || event_id != PROGRESS_EVENT); | 227 DCHECK(!ignore_progress_events_ || event_id != PROGRESS_EVENT); |
224 expected_events_.push_back(RaisedEvent(host_ids, event_id)); | 228 expected_events_.push_back(RaisedEvent(host_ids, event_id)); |
225 } | 229 } |
226 | 230 |
227 void SetIgnoreProgressEvents(bool ignore) { | 231 void SetIgnoreProgressEvents(bool ignore) { |
228 // Some tests involve joining new hosts to an already running update job | 232 // Some tests involve joining new hosts to an already running update job |
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3362 RunTestOnIOThread(&AppCacheUpdateJobTest::MultipleHeadersRefetchTest); | 3366 RunTestOnIOThread(&AppCacheUpdateJobTest::MultipleHeadersRefetchTest); |
3363 } | 3367 } |
3364 | 3368 |
3365 } // namespace appcache | 3369 } // namespace appcache |
3366 | 3370 |
3367 // AppCacheUpdateJobTest is expected to always live longer than the | 3371 // AppCacheUpdateJobTest is expected to always live longer than the |
3368 // runnable methods. This lets us call NewRunnableMethod on its instances. | 3372 // runnable methods. This lets us call NewRunnableMethod on its instances. |
3369 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest); | 3373 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest); |
3370 DISABLE_RUNNABLE_METHOD_REFCOUNT( | 3374 DISABLE_RUNNABLE_METHOD_REFCOUNT( |
3371 appcache::AppCacheUpdateJobTest::MockAppCachePolicy); | 3375 appcache::AppCacheUpdateJobTest::MockAppCachePolicy); |
OLD | NEW |