OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stack> | 5 #include <stack> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // Test Harness ------------------------------------------------------------- | 34 // Test Harness ------------------------------------------------------------- |
35 | 35 |
36 // Helper class used to verify test results | 36 // Helper class used to verify test results |
37 class MockStorageDelegate : public AppCacheStorage::Delegate { | 37 class MockStorageDelegate : public AppCacheStorage::Delegate { |
38 public: | 38 public: |
39 explicit MockStorageDelegate(AppCacheResponseTest* test) | 39 explicit MockStorageDelegate(AppCacheResponseTest* test) |
40 : loaded_info_id_(0), test_(test) { | 40 : loaded_info_id_(0), test_(test) { |
41 } | 41 } |
42 | 42 |
43 virtual void OnResponseInfoLoaded(AppCacheResponseInfo* info, | 43 virtual void OnResponseInfoLoaded(AppCacheResponseInfo* info, |
44 int64 response_id) OVERRIDE { | 44 int64 response_id) override { |
45 loaded_info_ = info; | 45 loaded_info_ = info; |
46 loaded_info_id_ = response_id; | 46 loaded_info_id_ = response_id; |
47 test_->ScheduleNextTask(); | 47 test_->ScheduleNextTask(); |
48 } | 48 } |
49 | 49 |
50 scoped_refptr<AppCacheResponseInfo> loaded_info_; | 50 scoped_refptr<AppCacheResponseInfo> loaded_info_; |
51 int64 loaded_info_id_; | 51 int64 loaded_info_id_; |
52 AppCacheResponseTest* test_; | 52 AppCacheResponseTest* test_; |
53 }; | 53 }; |
54 | 54 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 | 706 |
707 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { | 707 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { |
708 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); | 708 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); |
709 } | 709 } |
710 | 710 |
711 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { | 711 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { |
712 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); | 712 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); |
713 } | 713 } |
714 | 714 |
715 } // namespace content | 715 } // namespace content |
OLD | NEW |