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

Unified Diff: net/spdy/spdy_framer_test.cc

Issue 10138003: Remove SpdyFramer::CompressFrame() and use CompressControlFrame instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_framer.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer_test.cc
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 927953980a9bda94bdd058f0d2cb3f6f487508c6..1a03ed7f007505c51f2d923993e69a28a320c644 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -538,6 +538,20 @@ INSTANTIATE_TEST_CASE_P(SpdyFramerTests,
SpdyFramerTest,
::testing::Values(SPDY2, SPDY3));
+TEST_P(SpdyFramerTest, IsCompressible) {
+ SpdyFramer framer(spdy_version_);
+ for (SpdyControlType type = SYN_STREAM;
+ type < NUM_CONTROL_FRAME_TYPES;
+ type = static_cast<SpdyControlType>(type + 1)) {
+ SpdyFrameBuilder frame(type, CONTROL_FLAG_NONE, spdy_version_, 1024);
+ scoped_ptr<SpdyControlFrame> control_frame(
+ reinterpret_cast<SpdyControlFrame*>(frame.take()));
+ EXPECT_EQ(control_frame->has_header_block(),
+ framer.IsCompressible(*control_frame))
+ << "Frame type: " << type;
+ }
+}
+
// Test that we can encode and decode a SpdyHeaderBlock in serialized form.
TEST_P(SpdyFramerTest, HeaderBlockInBuffer) {
SpdyHeaderBlock headers;
« no previous file with comments | « net/spdy/spdy_framer.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698