summaryrefslogtreecommitdiffstats
path: root/net/spdy/buffered_spdy_framer_spdy2_unittest.cc
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 02:14:42 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 02:14:42 +0000
commit18b28abfc0a6afc32d44bafeff5caf4db80d0524 (patch)
treedf81aa7b884c28f2494f8e8d98803be44e16ad11 /net/spdy/buffered_spdy_framer_spdy2_unittest.cc
parent0a798a15c94fd3092ef36d7857ef3a6119e4c7d4 (diff)
downloadchromium_src-18b28abfc0a6afc32d44bafeff5caf4db80d0524.zip
chromium_src-18b28abfc0a6afc32d44bafeff5caf4db80d0524.tar.gz
chromium_src-18b28abfc0a6afc32d44bafeff5caf4db80d0524.tar.bz2
SPDY - replaced SpdySettings (list) with SettingsMap
CreateSettings accepts SettingsMap which enforces that there are no duplicate settings. Deleted unused class SpdySettingsStorage. In net-internals, log setting's id, flags and value for SpdySettings. BUG=119752 R=rch@chromium.org,hkhalil@google.com TEST=network unit tests Review URL: http://codereview.chromium.org/10054034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/buffered_spdy_framer_spdy2_unittest.cc')
-rw-r--r--net/spdy/buffered_spdy_framer_spdy2_unittest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/spdy/buffered_spdy_framer_spdy2_unittest.cc b/net/spdy/buffered_spdy_framer_spdy2_unittest.cc
index fbe97ab..950f038 100644
--- a/net/spdy/buffered_spdy_framer_spdy2_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_spdy2_unittest.cc
@@ -176,9 +176,11 @@ class BufferedSpdyFramerSpdy2Test : public PlatformTest {
TEST_F(BufferedSpdyFramerSpdy2Test, OnSetting) {
SpdyFramer framer(2);
- SpdySettings settings;
- settings.push_back(SpdySetting(SettingsFlagsAndId(0, 1), 0x00000002));
- settings.push_back(SpdySetting(SettingsFlagsAndId(0, 1), 0x00000003));
+ SettingsMap settings;
+ settings[SETTINGS_UPLOAD_BANDWIDTH] =
+ SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0x00000002);
+ settings[SETTINGS_DOWNLOAD_BANDWIDTH] =
+ SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0x00000003);
scoped_ptr<SpdyFrame> control_frame(framer.CreateSettings(settings));
TestBufferedSpdyVisitor visitor;
@@ -186,8 +188,8 @@ TEST_F(BufferedSpdyFramerSpdy2Test, OnSetting) {
visitor.SimulateInFramer(
reinterpret_cast<unsigned char*>(control_frame->data()),
control_frame->length() + SpdyControlFrame::kHeaderSize);
- EXPECT_EQ(1, visitor.error_count_);
- EXPECT_EQ(1, visitor.setting_count_);
+ EXPECT_EQ(0, visitor.error_count_);
+ EXPECT_EQ(2, visitor.setting_count_);
}
TEST_F(BufferedSpdyFramerSpdy2Test, ReadSynStreamHeaderBlock) {