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

Side by Side Diff: net/spdy/spdy_framer_test.cc

Issue 9185036: Handle Z_BUF_ERROR as a non-fatal error while incrementally decompressing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
« net/spdy/spdy_framer.cc ('K') | « net/spdy/spdy_framer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 5 #include <algorithm>
6 #include <iostream> 6 #include <iostream>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 #include "net/spdy/spdy_protocol.h" 10 #include "net/spdy/spdy_protocol.h"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 EXPECT_EQ(kValue3, decompressed_headers[kHeader3]); 810 EXPECT_EQ(kValue3, decompressed_headers[kHeader3]);
811 811
812 // We didn't have data streams, so we shouldn't have (de)compressors. 812 // We didn't have data streams, so we shouldn't have (de)compressors.
813 EXPECT_EQ(0, send_framer.num_stream_compressors()); 813 EXPECT_EQ(0, send_framer.num_stream_compressors());
814 EXPECT_EQ(0, send_framer.num_stream_decompressors()); 814 EXPECT_EQ(0, send_framer.num_stream_decompressors());
815 EXPECT_EQ(0, recv_framer.num_stream_compressors()); 815 EXPECT_EQ(0, recv_framer.num_stream_compressors());
816 EXPECT_EQ(0, recv_framer.num_stream_decompressors()); 816 EXPECT_EQ(0, recv_framer.num_stream_decompressors());
817 } 817 }
818 818
819 // Verify we don't leak when we leave streams unclosed 819 // Verify we don't leak when we leave streams unclosed
820 // http://crbug.com/108596 - Disabled, failed ASAN tests. 820 TEST_F(SpdyFramerTest, UnclosedStreamDataCompressors) {
821 // TODO(rtenneti): investigating why it is failing.
822 TEST_F(SpdyFramerTest, DISABLED_UnclosedStreamDataCompressors) {
823 SpdyFramer send_framer; 821 SpdyFramer send_framer;
824 822
825 send_framer.set_enable_compression(true); 823 send_framer.set_enable_compression(true);
826 824
827 const char kHeader1[] = "header1"; 825 const char kHeader1[] = "header1";
828 const char kHeader2[] = "header2"; 826 const char kHeader2[] = "header2";
829 const char kValue1[] = "value1"; 827 const char kValue1[] = "value1";
830 const char kValue2[] = "value2"; 828 const char kValue2[] = "value2";
831 829
832 SpdyHeaderBlock block; 830 SpdyHeaderBlock block;
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 } 1900 }
1903 1901
1904 std::string RandomString(int length) { 1902 std::string RandomString(int length) {
1905 std::string rv; 1903 std::string rv;
1906 for (int index = 0; index < length; index++) 1904 for (int index = 0; index < length; index++)
1907 rv += static_cast<char>('a' + (rand() % 26)); 1905 rv += static_cast<char>('a' + (rand() % 26));
1908 return rv; 1906 return rv;
1909 } 1907 }
1910 1908
1911 } // namespace 1909 } // namespace
OLDNEW
« net/spdy/spdy_framer.cc ('K') | « net/spdy/spdy_framer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698