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

Side by Side Diff: net/quic/core/quic_spdy_stream_test.cc

Issue 2249813002: Create EXPECT_QUIC_BUG macro, and modify QUIC tests to use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « net/quic/core/quic_session_test.cc ('k') | net/quic/core/quic_stream_sequencer_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/quic/core/quic_spdy_stream.h" 5 #include "net/quic/core/quic_spdy_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const string& data() const { return data_; } 60 const string& data() const { return data_; }
61 61
62 private: 62 private:
63 bool should_process_data_; 63 bool should_process_data_;
64 string data_; 64 string data_;
65 }; 65 };
66 66
67 class QuicSpdyStreamTest : public ::testing::TestWithParam<QuicVersion> { 67 class QuicSpdyStreamTest : public ::testing::TestWithParam<QuicVersion> {
68 public: 68 public:
69 QuicSpdyStreamTest() { 69 QuicSpdyStreamTest() {
70 FLAGS_quic_always_log_bugs_for_tests = true;
71 headers_[":host"] = "www.google.com"; 70 headers_[":host"] = "www.google.com";
72 headers_[":path"] = "/index.hml"; 71 headers_[":path"] = "/index.hml";
73 headers_[":scheme"] = "https"; 72 headers_[":scheme"] = "https";
74 headers_["cookie"] = 73 headers_["cookie"] =
75 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; " 74 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; "
76 "__utmc=160408618; " 75 "__utmc=160408618; "
77 "GX=DQAAAOEAAACWJYdewdE9rIrW6qw3PtVi2-d729qaa-74KqOsM1NVQblK4VhX" 76 "GX=DQAAAOEAAACWJYdewdE9rIrW6qw3PtVi2-d729qaa-74KqOsM1NVQblK4VhX"
78 "hoALMsy6HOdDad2Sz0flUByv7etmo3mLMidGrBoljqO9hSVA40SLqpG_iuKKSHX" 77 "hoALMsy6HOdDad2Sz0flUByv7etmo3mLMidGrBoljqO9hSVA40SLqpG_iuKKSHX"
79 "RW3Np4bq0F0SDGDNsW0DSmTS9ufMRrlpARJDS7qAI6M3bghqJp4eABKZiRqebHT" 78 "RW3Np4bq0F0SDGDNsW0DSmTS9ufMRrlpARJDS7qAI6M3bghqJp4eABKZiRqebHT"
80 "pMU-RXvTI5D5oCF1vYxYofH_l1Kviuiy3oQ1kS1enqWgbhJ2t61_SNdv-1XJIS0" 79 "pMU-RXvTI5D5oCF1vYxYofH_l1Kviuiy3oQ1kS1enqWgbhJ2t61_SNdv-1XJIS0"
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 .Times(AnyNumber()) 988 .Times(AnyNumber())
990 .WillRepeatedly(Invoke(MockQuicSession::ConsumeAllData)); 989 .WillRepeatedly(Invoke(MockQuicSession::ConsumeAllData));
991 990
992 // Write the initial headers, with a FIN. 991 // Write the initial headers, with a FIN.
993 EXPECT_CALL(*session_, WriteHeadersMock(_, _, _, _, _)); 992 EXPECT_CALL(*session_, WriteHeadersMock(_, _, _, _, _));
994 stream_->WriteHeaders(SpdyHeaderBlock(), /*fin=*/true, nullptr); 993 stream_->WriteHeaders(SpdyHeaderBlock(), /*fin=*/true, nullptr);
995 EXPECT_TRUE(stream_->fin_sent()); 994 EXPECT_TRUE(stream_->fin_sent());
996 995
997 // Writing Trailers should fail, as the FIN has already been sent. 996 // Writing Trailers should fail, as the FIN has already been sent.
998 // populated with the number of body bytes written. 997 // populated with the number of body bytes written.
999 EXPECT_DFATAL(stream_->WriteTrailers(SpdyHeaderBlock(), nullptr), 998 EXPECT_QUIC_BUG(stream_->WriteTrailers(SpdyHeaderBlock(), nullptr),
1000 "Trailers cannot be sent after a FIN"); 999 "Trailers cannot be sent after a FIN");
1001 } 1000 }
1002 1001
1003 } // namespace 1002 } // namespace
1004 } // namespace test 1003 } // namespace test
1005 } // namespace net 1004 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_session_test.cc ('k') | net/quic/core/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698