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

Unified Diff: net/spdy/spdy_header_indexing_test.cc

Issue 2801603003: Add SpdyString alias for std::string in net/spdy. (Closed)
Patch Set: Created 3 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_header_indexing.cc ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_header_indexing_test.cc
diff --git a/net/spdy/spdy_header_indexing_test.cc b/net/spdy/spdy_header_indexing_test.cc
index b471c93d1f70575e725864529395ebdc7a105d56..8797fef2790b8b784eb8c094b5b4ede64d1e7596 100644
--- a/net/spdy/spdy_header_indexing_test.cc
+++ b/net/spdy/spdy_header_indexing_test.cc
@@ -17,7 +17,7 @@ class HeaderIndexingPeer {
HeaderIndexingPeer() : hi_() {}
void CreateTestInit() {
- std::string input[] = {"key1", "key2", "key3"};
+ SpdyString input[] = {"key1", "key2", "key3"};
hi_.indexing_set_ =
HeaderIndexing::HeaderSet(input, input + arraysize(input));
hi_.tracking_set_ =
@@ -30,12 +30,12 @@ class HeaderIndexingPeer {
void CreateInitIndexingHeaders() { hi_.CreateInitIndexingHeaders(); }
- void TryInsert(std::string&& header) {
+ void TryInsert(SpdyString&& header) {
hi_.TryInsertHeader(std::move(header), &(hi_.indexing_set_),
hi_.indexing_set_bound_);
}
- bool InTrackingSet(const std::string& str) {
+ bool InTrackingSet(const SpdyString& str) {
return hi_.tracking_set_.find(str) != hi_.tracking_set_.end();
}
@@ -67,16 +67,16 @@ class SpdyHeaderIndexingTest : public ::testing::Test {
};
TEST_F(SpdyHeaderIndexingTest, TestTryInsertHeader) {
- std::string key("key4");
+ SpdyString key("key4");
hi_->TryInsert(std::move(key));
EXPECT_EQ(3u, hi_->indexing_set_size());
EXPECT_TRUE(hi_->ShouldIndex("key4"));
}
TEST_F(SpdyHeaderIndexingTest, TestShouldIndex) {
- std::string key3 = "key3";
- std::string key4 = "key4";
- std::string key5 = "key5";
+ SpdyString key3 = "key3";
+ SpdyString key4 = "key4";
+ SpdyString key5 = "key5";
// Cache hit.
EXPECT_TRUE(hi_->ShouldIndex(key3));
EXPECT_EQ(3u, hi_->indexing_set_size());
« no previous file with comments | « net/spdy/spdy_header_indexing.cc ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698