diff options
Diffstat (limited to 'net/log/net_log_capture_mode_unittest.cc')
-rw-r--r-- | net/log/net_log_capture_mode_unittest.cc | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/net/log/net_log_capture_mode_unittest.cc b/net/log/net_log_capture_mode_unittest.cc index b32beb9..f7f9fbd 100644 --- a/net/log/net_log_capture_mode_unittest.cc +++ b/net/log/net_log_capture_mode_unittest.cc @@ -10,29 +10,16 @@ namespace net { namespace { -TEST(NetLogCaptureMode, None) { - NetLogCaptureMode mode = NetLogCaptureMode::None(); - - EXPECT_FALSE(mode.enabled()); - EXPECT_FALSE(mode.include_cookies_and_credentials()); - EXPECT_FALSE(mode.include_socket_bytes()); - - EXPECT_EQ(mode, NetLogCaptureMode::None()); - EXPECT_NE(mode, NetLogCaptureMode::Default()); - EXPECT_NE(mode, NetLogCaptureMode::IncludeCookiesAndCredentials()); - EXPECT_NE(mode, NetLogCaptureMode::IncludeSocketBytes()); - EXPECT_EQ(mode.ToInternalValueForTesting(), - NetLogCaptureMode::None().ToInternalValueForTesting()); +TEST(NetLogCaptureMode, DefaultConstructor) { + EXPECT_EQ(NetLogCaptureMode(), NetLogCaptureMode::Default()); } TEST(NetLogCaptureMode, Default) { NetLogCaptureMode mode = NetLogCaptureMode::Default(); - EXPECT_TRUE(mode.enabled()); EXPECT_FALSE(mode.include_cookies_and_credentials()); EXPECT_FALSE(mode.include_socket_bytes()); - EXPECT_NE(mode, NetLogCaptureMode::None()); EXPECT_EQ(mode, NetLogCaptureMode::Default()); EXPECT_NE(mode, NetLogCaptureMode::IncludeCookiesAndCredentials()); EXPECT_NE(mode, NetLogCaptureMode::IncludeSocketBytes()); @@ -43,11 +30,9 @@ TEST(NetLogCaptureMode, Default) { TEST(NetLogCaptureMode, IncludeCookiesAndCredentials) { NetLogCaptureMode mode = NetLogCaptureMode::IncludeCookiesAndCredentials(); - EXPECT_TRUE(mode.enabled()); EXPECT_TRUE(mode.include_cookies_and_credentials()); EXPECT_FALSE(mode.include_socket_bytes()); - EXPECT_NE(mode, NetLogCaptureMode::None()); EXPECT_NE(mode, NetLogCaptureMode::Default()); EXPECT_EQ(mode, NetLogCaptureMode::IncludeCookiesAndCredentials()); EXPECT_NE(mode, NetLogCaptureMode::IncludeSocketBytes()); @@ -59,11 +44,9 @@ TEST(NetLogCaptureMode, IncludeCookiesAndCredentials) { TEST(NetLogCaptureMode, IncludeSocketBytes) { NetLogCaptureMode mode = NetLogCaptureMode::IncludeSocketBytes(); - EXPECT_TRUE(mode.enabled()); EXPECT_TRUE(mode.include_cookies_and_credentials()); EXPECT_TRUE(mode.include_socket_bytes()); - EXPECT_NE(mode, NetLogCaptureMode::None()); EXPECT_NE(mode, NetLogCaptureMode::Default()); EXPECT_NE(mode, NetLogCaptureMode::IncludeCookiesAndCredentials()); EXPECT_EQ(mode, NetLogCaptureMode::IncludeSocketBytes()); @@ -72,22 +55,6 @@ TEST(NetLogCaptureMode, IncludeSocketBytes) { NetLogCaptureMode::IncludeSocketBytes().ToInternalValueForTesting()); } -TEST(NetLogCaptureMode, Max) { - NetLogCaptureMode none = NetLogCaptureMode::None(); - NetLogCaptureMode all = NetLogCaptureMode::IncludeSocketBytes(); - NetLogCaptureMode cookies = NetLogCaptureMode::IncludeCookiesAndCredentials(); - NetLogCaptureMode def = NetLogCaptureMode::Default(); - - EXPECT_EQ(all, NetLogCaptureMode::Max(none, all)); - EXPECT_EQ(all, NetLogCaptureMode::Max(all, none)); - - EXPECT_EQ(cookies, NetLogCaptureMode::Max(def, cookies)); - EXPECT_EQ(cookies, NetLogCaptureMode::Max(cookies, def)); - - EXPECT_EQ(all, NetLogCaptureMode::Max(def, all)); - EXPECT_EQ(all, NetLogCaptureMode::Max(all, def)); -} - } // namespace } // namespace net |