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

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

Issue 1458163002: Remove |using base::StringPiece| from net/spdy header files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_session.h » ('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 (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 "net/spdy/spdy_header_block.h" 5 #include "net/spdy/spdy_header_block.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "net/log/net_log.h" 11 #include "net/log/net_log.h"
12 #include "net/spdy/spdy_test_utils.h" 12 #include "net/spdy/spdy_test_utils.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using std::make_pair; 16 using std::make_pair;
17 using std::string; 17 using std::string;
18 using ::testing::ElementsAre; 18 using ::testing::ElementsAre;
19 19
20 namespace net { 20 namespace net {
21 21
22 std::pair<StringPiece, StringPiece> Pair(StringPiece k, StringPiece v) { 22 std::pair<base::StringPiece, base::StringPiece> Pair(base::StringPiece k,
23 base::StringPiece v) {
23 return make_pair(k, v); 24 return make_pair(k, v);
24 } 25 }
25 26
26 // This test verifies that SpdyHeaderBlock behaves correctly when empty. 27 // This test verifies that SpdyHeaderBlock behaves correctly when empty.
27 TEST(SpdyHeaderBlockTest, EmptyBlock) { 28 TEST(SpdyHeaderBlockTest, EmptyBlock) {
28 SpdyHeaderBlock block; 29 SpdyHeaderBlock block;
29 EXPECT_TRUE(block.empty()); 30 EXPECT_TRUE(block.empty());
30 EXPECT_EQ(0u, block.size()); 31 EXPECT_EQ(0u, block.size());
31 EXPECT_EQ(block.end(), block.find("foo")); 32 EXPECT_EQ(block.end(), block.find("foo"));
32 EXPECT_TRUE(block.end() == block.begin()); 33 EXPECT_TRUE(block.end() == block.begin());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 scoped_ptr<base::Value> event_param(SpdyHeaderBlockNetLogCallback( 79 scoped_ptr<base::Value> event_param(SpdyHeaderBlockNetLogCallback(
79 &headers, NetLogCaptureMode::IncludeCookiesAndCredentials())); 80 &headers, NetLogCaptureMode::IncludeCookiesAndCredentials()));
80 81
81 SpdyHeaderBlock headers2; 82 SpdyHeaderBlock headers2;
82 ASSERT_TRUE(SpdyHeaderBlockFromNetLogParam(event_param.get(), &headers2)); 83 ASSERT_TRUE(SpdyHeaderBlockFromNetLogParam(event_param.get(), &headers2));
83 EXPECT_EQ(headers, headers2); 84 EXPECT_EQ(headers, headers2);
84 } 85 }
85 86
86 } // namespace net 87 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698