| 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 #include "webkit/appcache/appcache.h" | 6 #include "webkit/appcache/appcache.h" |
| 7 #include "webkit/appcache/appcache_group.h" | 7 #include "webkit/appcache/appcache_group.h" |
| 8 #include "webkit/appcache/appcache_host.h" | 8 #include "webkit/appcache/appcache_host.h" |
| 9 #include "webkit/appcache/mock_appcache_service.h" | 9 #include "webkit/appcache/mock_appcache_service.h" |
| 10 #include "webkit/appcache/appcache_update_job.h" | 10 #include "webkit/appcache/appcache_update_job.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 28 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
| 29 appcache::Status status) { | 29 appcache::Status status) { |
| 30 } | 30 } |
| 31 | 31 |
| 32 virtual void OnEventRaised(const std::vector<int>& host_ids, | 32 virtual void OnEventRaised(const std::vector<int>& host_ids, |
| 33 appcache::EventID event_id) { | 33 appcache::EventID event_id) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, |
| 37 const std::string& message) { |
| 38 } |
| 39 |
| 36 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, | 40 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
| 37 const GURL& url, | 41 const GURL& url, |
| 38 int num_total, int num_complete) { | 42 int num_total, int num_complete) { |
| 39 } | 43 } |
| 40 | 44 |
| 41 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, | 45 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
| 42 const std::string& message) { | 46 const std::string& message) { |
| 43 } | 47 } |
| 44 | 48 |
| 45 virtual void OnContentBlocked(int host_id, | 49 virtual void OnContentBlocked(int host_id, |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 EXPECT_TRUE(group->FindObserver(&host, group->observers_)); | 286 EXPECT_TRUE(group->FindObserver(&host, group->observers_)); |
| 283 | 287 |
| 284 // Delete update to cause it to complete. Verify host is notified. | 288 // Delete update to cause it to complete. Verify host is notified. |
| 285 delete group->update_job_; | 289 delete group->update_job_; |
| 286 EXPECT_EQ(AppCacheGroup::IDLE, group->update_status_); | 290 EXPECT_EQ(AppCacheGroup::IDLE, group->update_status_); |
| 287 EXPECT_FALSE(group->restart_update_task_); | 291 EXPECT_FALSE(group->restart_update_task_); |
| 288 EXPECT_TRUE(host.update_completed_); | 292 EXPECT_TRUE(host.update_completed_); |
| 289 } | 293 } |
| 290 | 294 |
| 291 } // namespace appcache | 295 } // namespace appcache |
| OLD | NEW |