blob: 99e9ac21b535432f9320fedfeb552751125cb1c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// 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_header_block.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "net/log/net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
TEST(SpdyHeaderBlockTest, ToNetLogParamAndBackAgain) {
SpdyHeaderBlock headers;
headers["A"] = "a";
headers["B"] = "b";
scoped_ptr<base::Value> event_param(SpdyHeaderBlockNetLogCallback(
&headers, NetLogCaptureMode::IncludeCookiesAndCredentials()));
SpdyHeaderBlock headers2;
ASSERT_TRUE(SpdyHeaderBlockFromNetLogParam(event_param.get(), &headers2));
EXPECT_EQ(headers, headers2);
}
} // namespace
} // namespace net
|