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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } // namespace | 160 } // namespace |
161 | 161 |
162 class MockFrontend : public AppCacheFrontend { | 162 class MockFrontend : public AppCacheFrontend { |
163 public: | 163 public: |
164 MockFrontend() | 164 MockFrontend() |
165 : ignore_progress_events_(false), verify_progress_events_(false), | 165 : ignore_progress_events_(false), verify_progress_events_(false), |
166 last_progress_total_(-1), last_progress_complete_(-1), | 166 last_progress_total_(-1), last_progress_complete_(-1), |
167 start_update_trigger_(CHECKING_EVENT), update_(NULL) { | 167 start_update_trigger_(CHECKING_EVENT), update_(NULL) { |
168 } | 168 } |
169 | 169 |
170 virtual void OnCacheSelected(int host_id, int64 cache_id, | 170 virtual void OnCacheSelected( |
171 Status status) { | 171 int host_id, const appcache::AppCacheInfo& info) { |
172 } | 172 } |
173 | 173 |
174 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 174 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
175 Status status) { | 175 Status status) { |
176 } | 176 } |
177 | 177 |
178 virtual void OnEventRaised(const std::vector<int>& host_ids, | 178 virtual void OnEventRaised(const std::vector<int>& host_ids, |
179 EventID event_id) { | 179 EventID event_id) { |
180 raised_events_.push_back(RaisedEvent(host_ids, event_id)); | 180 raised_events_.push_back(RaisedEvent(host_ids, event_id)); |
181 | 181 |
(...skipping 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3423 RunTestOnIOThread(&AppCacheUpdateJobTest::MultipleHeadersRefetchTest); | 3423 RunTestOnIOThread(&AppCacheUpdateJobTest::MultipleHeadersRefetchTest); |
3424 } | 3424 } |
3425 | 3425 |
3426 } // namespace appcache | 3426 } // namespace appcache |
3427 | 3427 |
3428 // AppCacheUpdateJobTest is expected to always live longer than the | 3428 // AppCacheUpdateJobTest is expected to always live longer than the |
3429 // runnable methods. This lets us call NewRunnableMethod on its instances. | 3429 // runnable methods. This lets us call NewRunnableMethod on its instances. |
3430 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest); | 3430 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest); |
3431 DISABLE_RUNNABLE_METHOD_REFCOUNT( | 3431 DISABLE_RUNNABLE_METHOD_REFCOUNT( |
3432 appcache::AppCacheUpdateJobTest::MockAppCachePolicy); | 3432 appcache::AppCacheUpdateJobTest::MockAppCachePolicy); |
OLD | NEW |