| 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 <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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 base::Unretained(this)), | 645 base::Unretained(this)), |
| 646 base::TimeDelta::FromMilliseconds(10)); | 646 base::TimeDelta::FromMilliseconds(10)); |
| 647 } | 647 } |
| 648 | 648 |
| 649 void VerifyNoCallbacks() { | 649 void VerifyNoCallbacks() { |
| 650 EXPECT_TRUE(!write_callback_was_called_); | 650 EXPECT_TRUE(!write_callback_was_called_); |
| 651 EXPECT_TRUE(!read_callback_was_called_); | 651 EXPECT_TRUE(!read_callback_was_called_); |
| 652 TestFinished(); | 652 TestFinished(); |
| 653 } | 653 } |
| 654 | 654 |
| 655 // todo: DisableDiskCacheWithIOPending --------------------------------------- |
| 656 // or maybe add appcache_diskcache_unittests for Disable/Abandon test cases? |
| 657 |
| 655 // Data members | 658 // Data members |
| 656 | 659 |
| 657 scoped_ptr<base::WaitableEvent> test_finished_event_; | 660 scoped_ptr<base::WaitableEvent> test_finished_event_; |
| 658 scoped_ptr<MockStorageDelegate> storage_delegate_; | 661 scoped_ptr<MockStorageDelegate> storage_delegate_; |
| 659 scoped_ptr<MockAppCacheService> service_; | 662 scoped_ptr<MockAppCacheService> service_; |
| 660 std::stack<std::pair<base::Closure, bool> > task_stack_; | 663 std::stack<std::pair<base::Closure, bool> > task_stack_; |
| 661 | 664 |
| 662 scoped_ptr<AppCacheResponseReader> reader_; | 665 scoped_ptr<AppCacheResponseReader> reader_; |
| 663 scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_; | 666 scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_; |
| 664 scoped_refptr<IOBuffer> read_buffer_; | 667 scoped_refptr<IOBuffer> read_buffer_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 | 711 |
| 709 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { | 712 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { |
| 710 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); | 713 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); |
| 711 } | 714 } |
| 712 | 715 |
| 713 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { | 716 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { |
| 714 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); | 717 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); |
| 715 } | 718 } |
| 716 | 719 |
| 717 } // namespace appcache | 720 } // namespace appcache |
| OLD | NEW |