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

Side by Side Diff: net/quic/quic_header_list_test.cc

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_header_list.cc ('k') | net/quic/quic_headers_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/quic/quic_header_list.h"
6
7 #include "net/test/gtest_util.h"
8 #include "testing/gmock/include/gmock/gmock.h"
9
10 namespace net {
11
12 // This test verifies that QuicHeaderList accumulates header pairs in order.
13 TEST(QuicHeaderListTest, OnHeader) {
14 QuicHeaderList headers;
15 headers.OnHeader("foo", "bar");
16 headers.OnHeader("april", "fools");
17 headers.OnHeader("beep", "");
18
19 EXPECT_EQ("{ foo=bar, april=fools, beep=, }", headers.DebugString());
20 }
21
22 // This test verifies that QuicHeaderList is copyable and assignable.
23 TEST(QuicHeaderListTest, IsCopyableAndAssignable) {
24 QuicHeaderList headers;
25 headers.OnHeader("foo", "bar");
26 headers.OnHeader("april", "fools");
27 headers.OnHeader("beep", "");
28
29 QuicHeaderList headers2(headers);
30 QuicHeaderList headers3 = headers;
31
32 EXPECT_EQ("{ foo=bar, april=fools, beep=, }", headers2.DebugString());
33 EXPECT_EQ("{ foo=bar, april=fools, beep=, }", headers3.DebugString());
34 }
35
36 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_header_list.cc ('k') | net/quic/quic_headers_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698