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 <vector> | 7 #include <vector> |
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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 handler_.reset(host_->CreateRequestHandler(request_.get(), | 790 handler_.reset(host_->CreateRequestHandler(request_.get(), |
791 RESOURCE_TYPE_MAIN_FRAME)); | 791 RESOURCE_TYPE_MAIN_FRAME)); |
792 EXPECT_TRUE(handler_.get()); | 792 EXPECT_TRUE(handler_.get()); |
793 | 793 |
794 job_ = handler_->MaybeLoadResource(request_.get(), | 794 job_ = handler_->MaybeLoadResource(request_.get(), |
795 request_->context()->network_delegate()); | 795 request_->context()->network_delegate()); |
796 EXPECT_TRUE(job_.get()); | 796 EXPECT_TRUE(job_.get()); |
797 EXPECT_TRUE(job_->is_waiting()); | 797 EXPECT_TRUE(job_->is_waiting()); |
798 EXPECT_FALSE(job_->has_been_started()); | 798 EXPECT_FALSE(job_->has_been_started()); |
799 | 799 |
800 job_factory_->SetJob(job_); | 800 job_factory_->SetJob(job_.get()); |
801 request_->Start(); | 801 request_->Start(); |
802 EXPECT_TRUE(job_->has_been_started()); | 802 EXPECT_TRUE(job_->has_been_started()); |
803 | 803 |
804 request_->Cancel(); | 804 request_->Cancel(); |
805 EXPECT_TRUE(job_->has_been_killed()); | 805 EXPECT_TRUE(job_->has_been_killed()); |
806 | 806 |
807 EXPECT_FALSE(handler_->MaybeLoadFallbackForResponse( | 807 EXPECT_FALSE(handler_->MaybeLoadFallbackForResponse( |
808 request_.get(), request_->context()->network_delegate())); | 808 request_.get(), request_->context()->network_delegate())); |
809 | 809 |
810 TestFinished(); | 810 TestFinished(); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 | 1002 |
1003 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { | 1003 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { |
1004 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); | 1004 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); |
1005 } | 1005 } |
1006 | 1006 |
1007 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { | 1007 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { |
1008 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); | 1008 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); |
1009 } | 1009 } |
1010 | 1010 |
1011 } // namespace content | 1011 } // namespace content |
OLD | NEW |