| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_log_util.h" | 5 #include "net/spdy/chromium/spdy_log_util.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 TEST(SpdyLogUtilTest, ElideGoAwayDebugDataForNetLog) { | 12 TEST(SpdyLogUtilTest, ElideGoAwayDebugDataForNetLog) { |
| 13 // Only elide for appropriate log level. | 13 // Only elide for appropriate log level. |
| 14 EXPECT_EQ( | 14 EXPECT_EQ( |
| 15 "[6 bytes were stripped]", | 15 "[6 bytes were stripped]", |
| (...skipping 20 matching lines...) Expand all Loading... |
| 36 list = ElideSpdyHeaderBlockForNetLog( | 36 list = ElideSpdyHeaderBlockForNetLog( |
| 37 headers, NetLogCaptureMode::IncludeCookiesAndCredentials()); | 37 headers, NetLogCaptureMode::IncludeCookiesAndCredentials()); |
| 38 EXPECT_EQ(2u, list->GetSize()); | 38 EXPECT_EQ(2u, list->GetSize()); |
| 39 EXPECT_TRUE(list->GetString(0, &field)); | 39 EXPECT_TRUE(list->GetString(0, &field)); |
| 40 EXPECT_EQ("foo: bar", field); | 40 EXPECT_EQ("foo: bar", field); |
| 41 EXPECT_TRUE(list->GetString(1, &field)); | 41 EXPECT_TRUE(list->GetString(1, &field)); |
| 42 EXPECT_EQ("cookie: name=value", field); | 42 EXPECT_EQ("cookie: name=value", field); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace net | 45 } // namespace net |
| OLD | NEW |