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

Side by Side Diff: net/http/http_log_util_unittest.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/http/http_log_util.h" 5 #include "net/http/http_log_util.h"
6
7 #include "net/log/net_log_capture_mode.h"
6 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
7 9
8 namespace net { 10 namespace net {
9 11
10 TEST(HttpLogUtilTest, ElideHeaderValueForNetLog) { 12 TEST(HttpLogUtilTest, ElideHeaderValueForNetLog) {
11 // Only elide for appropriate log level. 13 // Only elide for appropriate log level.
12 EXPECT_EQ("[10 bytes were stripped]", 14 EXPECT_EQ("[10 bytes were stripped]",
13 ElideHeaderValueForNetLog(NetLogCaptureMode::Default(), "Cookie", 15 ElideHeaderValueForNetLog(NetLogCaptureMode::Default(), "Cookie",
14 "name=value")); 16 "name=value"));
15 EXPECT_EQ("name=value", ElideHeaderValueForNetLog( 17 EXPECT_EQ("name=value", ElideHeaderValueForNetLog(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Only elide for appropriate log level. 74 // Only elide for appropriate log level.
73 EXPECT_EQ( 75 EXPECT_EQ(
74 "[6 bytes were stripped]", 76 "[6 bytes were stripped]",
75 ElideGoAwayDebugDataForNetLog(NetLogCaptureMode::Default(), "foobar")); 77 ElideGoAwayDebugDataForNetLog(NetLogCaptureMode::Default(), "foobar"));
76 EXPECT_EQ("foobar", 78 EXPECT_EQ("foobar",
77 ElideGoAwayDebugDataForNetLog( 79 ElideGoAwayDebugDataForNetLog(
78 NetLogCaptureMode::IncludeCookiesAndCredentials(), "foobar")); 80 NetLogCaptureMode::IncludeCookiesAndCredentials(), "foobar"));
79 } 81 }
80 82
81 } // namspace net 83 } // namspace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698