| 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 20 matching lines...) Expand all Loading... |
| 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 OnProgressEventRaised(const std::vector<int>& host_ids, | 36 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
| 37 const GURL& url, | 37 const GURL& url, |
| 38 int num_total, int num_complete) { | 38 int num_total, int num_complete) { |
| 39 } | 39 } |
| 40 | 40 |
| 41 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
| 42 const std::string& message) { |
| 43 } |
| 44 |
| 41 virtual void OnContentBlocked(int host_id) { | 45 virtual void OnContentBlocked(int host_id) { |
| 42 } | 46 } |
| 43 | 47 |
| 44 int last_host_id_; | 48 int last_host_id_; |
| 45 int64 last_cache_id_; | 49 int64 last_cache_id_; |
| 46 appcache::Status last_status_; | 50 appcache::Status last_status_; |
| 47 }; | 51 }; |
| 48 | 52 |
| 49 } // namespace anon | 53 } // namespace anon |
| 50 | 54 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 EXPECT_TRUE(group->FindObserver(&host, group->observers_)); | 281 EXPECT_TRUE(group->FindObserver(&host, group->observers_)); |
| 278 | 282 |
| 279 // Delete update to cause it to complete. Verify host is notified. | 283 // Delete update to cause it to complete. Verify host is notified. |
| 280 delete group->update_job_; | 284 delete group->update_job_; |
| 281 EXPECT_EQ(AppCacheGroup::IDLE, group->update_status_); | 285 EXPECT_EQ(AppCacheGroup::IDLE, group->update_status_); |
| 282 EXPECT_FALSE(group->restart_update_task_); | 286 EXPECT_FALSE(group->restart_update_task_); |
| 283 EXPECT_TRUE(host.update_completed_); | 287 EXPECT_TRUE(host.update_completed_); |
| 284 } | 288 } |
| 285 | 289 |
| 286 } // namespace appcache | 290 } // namespace appcache |
| OLD | NEW |