Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: net/http/bidirectional_stream_unittest.cc

Issue 2837863004: Use base::OneShotTimer instead of base::Timer(false, false)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/bidirectional_stream.h" 5 #include "net/http/bidirectional_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 CONNECT_TIMING_HAS_SSL_TIMES | CONNECT_TIMING_HAS_DNS_TIMES); 81 CONNECT_TIMING_HAS_SSL_TIMES | CONNECT_TIMING_HAS_DNS_TIMES);
82 ExpectLoadTimingValid(load_timing_info); 82 ExpectLoadTimingValid(load_timing_info);
83 } 83 }
84 84
85 // Delegate that reads data but does not send any data. 85 // Delegate that reads data but does not send any data.
86 class TestDelegateBase : public BidirectionalStream::Delegate { 86 class TestDelegateBase : public BidirectionalStream::Delegate {
87 public: 87 public:
88 TestDelegateBase(IOBuffer* read_buf, int read_buf_len) 88 TestDelegateBase(IOBuffer* read_buf, int read_buf_len)
89 : TestDelegateBase(read_buf, 89 : TestDelegateBase(read_buf,
90 read_buf_len, 90 read_buf_len,
91 base::MakeUnique<base::Timer>(false, false)) {} 91 base::MakeUnique<base::OneShotTimer>()) {}
92 92
93 TestDelegateBase(IOBuffer* read_buf, 93 TestDelegateBase(IOBuffer* read_buf,
94 int read_buf_len, 94 int read_buf_len,
95 std::unique_ptr<base::Timer> timer) 95 std::unique_ptr<base::Timer> timer)
96 : read_buf_(read_buf), 96 : read_buf_(read_buf),
97 read_buf_len_(read_buf_len), 97 read_buf_len_(read_buf_len),
98 timer_(std::move(timer)), 98 timer_(std::move(timer)),
99 loop_(nullptr), 99 loop_(nullptr),
100 received_bytes_(0), 100 received_bytes_(0),
101 sent_bytes_(0), 101 sent_bytes_(0),
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 AlternativeServiceVector alternative_service_vector = 1657 AlternativeServiceVector alternative_service_vector =
1658 http_session_->http_server_properties()->GetAlternativeServices( 1658 http_session_->http_server_properties()->GetAlternativeServices(
1659 url::SchemeHostPort(default_url_)); 1659 url::SchemeHostPort(default_url_));
1660 ASSERT_EQ(1u, alternative_service_vector.size()); 1660 ASSERT_EQ(1u, alternative_service_vector.size());
1661 EXPECT_EQ(kProtoQUIC, alternative_service_vector[0].protocol); 1661 EXPECT_EQ(kProtoQUIC, alternative_service_vector[0].protocol);
1662 EXPECT_EQ("www.example.org", alternative_service_vector[0].host); 1662 EXPECT_EQ("www.example.org", alternative_service_vector[0].host);
1663 EXPECT_EQ(443, alternative_service_vector[0].port); 1663 EXPECT_EQ(443, alternative_service_vector[0].port);
1664 } 1664 }
1665 1665
1666 } // namespace net 1666 } // namespace net
OLDNEW
« no previous file with comments | « net/http/bidirectional_stream.cc ('k') | net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698