diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 20:51:57 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 20:51:57 +0000 |
commit | 7207444043c9805d032bc6d03c2ffef1e747e5ce (patch) | |
tree | 717fe87e9c796ee3904a3d7a6aa30ca2237c5548 /net/spdy/spdy_http_utils_unittest.cc | |
parent | f16efd0d09dc0e16ac700a449f3f387f744718e3 (diff) | |
download | chromium_src-7207444043c9805d032bc6d03c2ffef1e747e5ce.zip chromium_src-7207444043c9805d032bc6d03c2ffef1e747e5ce.tar.gz chromium_src-7207444043c9805d032bc6d03c2ffef1e747e5ce.tar.bz2 |
Make ConvertRequestPriorityToSpdyPriority aware of new SPDY 3 priorities.
BUG=123278
TEST=net_unittests
Review URL: http://codereview.chromium.org/10105034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_http_utils_unittest.cc')
-rw-r--r-- | net/spdy/spdy_http_utils_unittest.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net/spdy/spdy_http_utils_unittest.cc b/net/spdy/spdy_http_utils_unittest.cc new file mode 100644 index 0000000..2419de1 --- /dev/null +++ b/net/spdy/spdy_http_utils_unittest.cc @@ -0,0 +1,30 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "net/spdy/spdy_http_utils.h" + +#include "testing/platform_test.h" + +namespace net { + +namespace test { + +TEST(SpdyHttpUtilsTest, ConvertRequestPriorityToSpdy2Priority) { + EXPECT_EQ(0, ConvertRequestPriorityToSpdyPriority(HIGHEST, 2)); + EXPECT_EQ(1, ConvertRequestPriorityToSpdyPriority(MEDIUM, 2)); + EXPECT_EQ(2, ConvertRequestPriorityToSpdyPriority(LOW, 2)); + EXPECT_EQ(2, ConvertRequestPriorityToSpdyPriority(LOWEST, 2)); + EXPECT_EQ(3, ConvertRequestPriorityToSpdyPriority(IDLE, 2)); +} +TEST(SpdyHttpUtilsTest, ConvertRequestPriorityToSpdy3Priority) { + EXPECT_EQ(0, ConvertRequestPriorityToSpdyPriority(HIGHEST, 3)); + EXPECT_EQ(1, ConvertRequestPriorityToSpdyPriority(MEDIUM, 3)); + EXPECT_EQ(2, ConvertRequestPriorityToSpdyPriority(LOW, 3)); + EXPECT_EQ(3, ConvertRequestPriorityToSpdyPriority(LOWEST, 3)); + EXPECT_EQ(4, ConvertRequestPriorityToSpdyPriority(IDLE, 3)); +} + +} // namespace test + +} // namespace net |