OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "net/http/http_stream_factory_impl_request.h" | 5 #include "net/http/http_stream_factory_impl_request.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "net/http/http_stream_factory_impl.h" | 11 #include "net/http/http_stream_factory_impl.h" |
12 #include "net/http/http_stream_factory_impl_job.h" | 12 #include "net/http/http_stream_factory_impl_job.h" |
13 #include "net/http/http_stream_factory_impl_job_controller.h" | 13 #include "net/http/http_stream_factory_impl_job_controller.h" |
14 #include "net/http/http_stream_factory_test_util.h" | 14 #include "net/http/http_stream_factory_test_util.h" |
15 #include "net/proxy/proxy_info.h" | 15 #include "net/proxy/proxy_info.h" |
16 #include "net/proxy/proxy_service.h" | 16 #include "net/proxy/proxy_service.h" |
17 #include "net/spdy/spdy_test_util_common.h" | 17 #include "net/spdy/chromium/spdy_test_util_common.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using testing::_; | 20 using testing::_; |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 class HttpStreamFactoryImplRequestTest : public ::testing::Test {}; | 24 class HttpStreamFactoryImplRequestTest : public ::testing::Test {}; |
25 | 25 |
26 // Make sure that Request passes on its priority updates to its jobs. | 26 // Make sure that Request passes on its priority updates to its jobs. |
27 TEST_F(HttpStreamFactoryImplRequestTest, SetPriority) { | 27 TEST_F(HttpStreamFactoryImplRequestTest, SetPriority) { |
(...skipping 26 matching lines...) Expand all Loading... |
54 EXPECT_EQ(MEDIUM, job_controller_raw_ptr->main_job()->priority()); | 54 EXPECT_EQ(MEDIUM, job_controller_raw_ptr->main_job()->priority()); |
55 | 55 |
56 EXPECT_CALL(request_delegate, OnStreamFailed(_, _)).Times(1); | 56 EXPECT_CALL(request_delegate, OnStreamFailed(_, _)).Times(1); |
57 job_controller_raw_ptr->OnStreamFailed(job_factory.main_job(), ERR_FAILED, | 57 job_controller_raw_ptr->OnStreamFailed(job_factory.main_job(), ERR_FAILED, |
58 SSLConfig()); | 58 SSLConfig()); |
59 | 59 |
60 request->SetPriority(IDLE); | 60 request->SetPriority(IDLE); |
61 EXPECT_EQ(IDLE, job_controller_raw_ptr->main_job()->priority()); | 61 EXPECT_EQ(IDLE, job_controller_raw_ptr->main_job()->priority()); |
62 } | 62 } |
63 } // namespace net | 63 } // namespace net |
OLD | NEW |