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

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

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove accidental include from merge Created 6 years, 3 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 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace net { 8 namespace net {
9 9
10 TEST(HttpLogUtilTest, ElideHeaderValueForNetLog) { 10 TEST(HttpLogUtilTest, ElideHeaderValueForNetLog) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 EXPECT_EQ("NTLM [4 bytes were stripped]", ElideHeaderValueForNetLog( 48 EXPECT_EQ("NTLM [4 bytes were stripped]", ElideHeaderValueForNetLog(
49 NetLog::LOG_STRIP_PRIVATE_DATA, "WWW-Authenticate", "NTLM 1234")); 49 NetLog::LOG_STRIP_PRIVATE_DATA, "WWW-Authenticate", "NTLM 1234"));
50 EXPECT_EQ("NTLM [4 bytes were stripped]", ElideHeaderValueForNetLog( 50 EXPECT_EQ("NTLM [4 bytes were stripped]", ElideHeaderValueForNetLog(
51 NetLog::LOG_STRIP_PRIVATE_DATA, "Proxy-Authenticate", "NTLM 1234")); 51 NetLog::LOG_STRIP_PRIVATE_DATA, "Proxy-Authenticate", "NTLM 1234"));
52 52
53 // Leave whitespace intact. 53 // Leave whitespace intact.
54 EXPECT_EQ("NTLM [4 bytes were stripped] ", ElideHeaderValueForNetLog( 54 EXPECT_EQ("NTLM [4 bytes were stripped] ", ElideHeaderValueForNetLog(
55 NetLog::LOG_STRIP_PRIVATE_DATA, "WWW-Authenticate", "NTLM 1234 ")); 55 NetLog::LOG_STRIP_PRIVATE_DATA, "WWW-Authenticate", "NTLM 1234 "));
56 56
57 // Extra elisions for SPDY_PROXY_AUTH_ORIGIN. 57 // Extra elisions for SPDY_PROXY_AUTH_ORIGIN.
58 #if defined(SPDY_PROXY_AUTH_ORIGIN)
59 EXPECT_EQ("ps=123, [7 bytes were stripped], c=foo, v=bar", 58 EXPECT_EQ("ps=123, [7 bytes were stripped], c=foo, v=bar",
60 ElideHeaderValueForNetLog( 59 ElideHeaderValueForNetLog(
61 NetLog::LOG_STRIP_PRIVATE_DATA, 60 NetLog::LOG_STRIP_PRIVATE_DATA,
62 "Chrome-Proxy", "ps=123, sid=456, c=foo, v=bar")); 61 "Chrome-Proxy", "ps=123, sid=456, c=foo, v=bar"));
63 EXPECT_EQ("[7 bytes were stripped], ps=123, c=foo, v=bar", 62 EXPECT_EQ("[7 bytes were stripped], ps=123, c=foo, v=bar",
64 ElideHeaderValueForNetLog( 63 ElideHeaderValueForNetLog(
65 NetLog::LOG_STRIP_PRIVATE_DATA, 64 NetLog::LOG_STRIP_PRIVATE_DATA,
66 "Chrome-Proxy", "sid=456, ps=123, c=foo, v=bar")); 65 "Chrome-Proxy", "sid=456, ps=123, c=foo, v=bar"));
67 EXPECT_EQ("ps=123, c=foo, v=bar, [7 bytes were stripped]", 66 EXPECT_EQ("ps=123, c=foo, v=bar, [7 bytes were stripped]",
68 ElideHeaderValueForNetLog( 67 ElideHeaderValueForNetLog(
69 NetLog::LOG_STRIP_PRIVATE_DATA, 68 NetLog::LOG_STRIP_PRIVATE_DATA,
70 "Chrome-Proxy", "ps=123, c=foo, v=bar, sid=456")); 69 "Chrome-Proxy", "ps=123, c=foo, v=bar, sid=456"));
mmenke 2014/09/05 16:29:10 Actually, you should just delete these 3 expects,
Not at Google. Contact bengr 2014/09/05 21:24:35 Done.
71 #endif
72 } 70 }
73 71
74 } // namspace net 72 } // namspace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698