1 // Copyright 2015 The Chromium Authors 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/log/net_log_capture_mode.h" 6 7 #include "testing/gtest/include/gtest/gtest.h" 8 9 namespace net { 10 11 namespace { 12 TEST(NetLogCaptureMode,Default)13TEST(NetLogCaptureMode, Default) { 14 NetLogCaptureMode mode = NetLogCaptureMode::kDefault; 15 16 EXPECT_FALSE(NetLogCaptureIncludesSensitive(mode)); 17 EXPECT_FALSE(NetLogCaptureIncludesSocketBytes(mode)); 18 } 19 TEST(NetLogCaptureMode,IncludeSensitive)20TEST(NetLogCaptureMode, IncludeSensitive) { 21 NetLogCaptureMode mode = NetLogCaptureMode::kIncludeSensitive; 22 23 EXPECT_TRUE(NetLogCaptureIncludesSensitive(mode)); 24 EXPECT_FALSE(NetLogCaptureIncludesSocketBytes(mode)); 25 } 26 TEST(NetLogCaptureMode,Everything)27TEST(NetLogCaptureMode, Everything) { 28 NetLogCaptureMode mode = NetLogCaptureMode::kEverything; 29 30 EXPECT_TRUE(NetLogCaptureIncludesSensitive(mode)); 31 EXPECT_TRUE(NetLogCaptureIncludesSocketBytes(mode)); 32 } 33 34 } // namespace 35 36 } // namespace net 37