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 "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
7 #include "net/url_request/url_request.h" | 7 #include "net/url_request/url_request.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "webkit/appcache/appcache.h" | 9 #include "webkit/appcache/appcache.h" |
10 #include "webkit/appcache/appcache_backend_impl.h" | 10 #include "webkit/appcache/appcache_backend_impl.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 44 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
45 appcache::Status status) { | 45 appcache::Status status) { |
46 last_status_changed_ = status; | 46 last_status_changed_ = status; |
47 } | 47 } |
48 | 48 |
49 virtual void OnEventRaised(const std::vector<int>& host_ids, | 49 virtual void OnEventRaised(const std::vector<int>& host_ids, |
50 appcache::EventID event_id) { | 50 appcache::EventID event_id) { |
51 last_event_id_ = event_id; | 51 last_event_id_ = event_id; |
52 } | 52 } |
53 | 53 |
| 54 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, |
| 55 const std::string& message) { |
| 56 last_event_id_ = ERROR_EVENT; |
| 57 } |
| 58 |
54 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, | 59 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
55 const GURL& url, | 60 const GURL& url, |
56 int num_total, int num_complete) { | 61 int num_total, int num_complete) { |
57 last_event_id_ = PROGRESS_EVENT; | 62 last_event_id_ = PROGRESS_EVENT; |
58 } | 63 } |
59 | 64 |
60 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, | 65 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
61 const std::string& message) { | 66 const std::string& message) { |
62 } | 67 } |
63 | 68 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 347 |
343 // Simulate the parent being torn down. | 348 // Simulate the parent being torn down. |
344 backend_impl.UnregisterHost(kParentHostId); | 349 backend_impl.UnregisterHost(kParentHostId); |
345 parent_host = NULL; | 350 parent_host = NULL; |
346 EXPECT_EQ(NULL, backend_impl.GetHost(kParentHostId)); | 351 EXPECT_EQ(NULL, backend_impl.GetHost(kParentHostId)); |
347 EXPECT_EQ(NULL, worker_host->GetParentAppCacheHost()); | 352 EXPECT_EQ(NULL, worker_host->GetParentAppCacheHost()); |
348 } | 353 } |
349 | 354 |
350 } // namespace appcache | 355 } // namespace appcache |
351 | 356 |
OLD | NEW |