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

Unified Diff: net/log/net_log_capture_mode_unittest.cc

Issue 1122483004: Remove NetLog::GetCaptureMode() and NetLogCaptureMode::None() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmenke_refactor
Patch Set: second attempt at fixing int --> bool warning on windows Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/log/net_log_capture_mode.cc ('k') | net/log/net_log_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log_capture_mode_unittest.cc
diff --git a/net/log/net_log_capture_mode_unittest.cc b/net/log/net_log_capture_mode_unittest.cc
index b32beb9e7ac80ddb0192d83b4910111a2b86c9cd..f7f9fbd79107d0c40aee92091141fbe115fc4113 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
« no previous file with comments | « net/log/net_log_capture_mode.cc ('k') | net/log/net_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698