OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "webkit/browser/appcache/appcache.h" | 9 #include "webkit/browser/appcache/appcache.h" |
10 #include "webkit/browser/appcache/appcache_group.h" | 10 #include "webkit/browser/appcache/appcache_group.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 32 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
33 appcache::Status status) OVERRIDE { | 33 appcache::Status status) OVERRIDE { |
34 } | 34 } |
35 | 35 |
36 virtual void OnEventRaised(const std::vector<int>& host_ids, | 36 virtual void OnEventRaised(const std::vector<int>& host_ids, |
37 appcache::EventID event_id) OVERRIDE { | 37 appcache::EventID event_id) OVERRIDE { |
38 } | 38 } |
39 | 39 |
40 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, | 40 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, |
41 const std::string& message) OVERRIDE { | 41 const appcache::ErrorDetails& details) |
42 } | 42 OVERRIDE {} |
43 | 43 |
44 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, | 44 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
45 const GURL& url, | 45 const GURL& url, |
46 int num_total, int num_complete) OVERRIDE { | 46 int num_total, int num_complete) OVERRIDE { |
47 } | 47 } |
48 | 48 |
49 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, | 49 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
50 const std::string& message) OVERRIDE { | 50 const std::string& message) OVERRIDE { |
51 } | 51 } |
52 | 52 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 EXPECT_TRUE(group->FindObserver(&host, group->observers_)); | 293 EXPECT_TRUE(group->FindObserver(&host, group->observers_)); |
294 | 294 |
295 // Delete update to cause it to complete. Verify host is notified. | 295 // Delete update to cause it to complete. Verify host is notified. |
296 delete group->update_job_; | 296 delete group->update_job_; |
297 EXPECT_EQ(AppCacheGroup::IDLE, group->update_status_); | 297 EXPECT_EQ(AppCacheGroup::IDLE, group->update_status_); |
298 EXPECT_TRUE(group->restart_update_task_.IsCancelled()); | 298 EXPECT_TRUE(group->restart_update_task_.IsCancelled()); |
299 EXPECT_TRUE(host.update_completed_); | 299 EXPECT_TRUE(host.update_completed_); |
300 } | 300 } |
301 | 301 |
302 } // namespace appcache | 302 } // namespace appcache |
OLD | NEW |