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

Unified Diff: base/trace_event/trace_config_unittest.cc

Issue 1479443002: Fixed an issue where tracing events got incorrectly enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « base/trace_event/trace_config.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_config_unittest.cc
diff --git a/base/trace_event/trace_config_unittest.cc b/base/trace_event/trace_config_unittest.cc
index 84da739b5477377472c12fa6d0b52b5bd88fc466..1d888912a93b8370edfd91f6a32e266b0fef7d5b 100644
--- a/base/trace_event/trace_config_unittest.cc
+++ b/base/trace_event/trace_config_unittest.cc
@@ -448,6 +448,12 @@ TEST(TraceConfigTest, IsCategoryGroupEnabled) {
EXPECT_TRUE(tc.IsCategoryGroupEnabled("disabled-by-default-cc"));
EXPECT_TRUE(tc.IsCategoryGroupEnabled("included"));
EXPECT_FALSE(tc.IsCategoryGroupEnabled("other_included"));
+
+ // Excluding categories won't enable disabled-by-default ones with the
+ // excluded category is also present in the group.
+ tc = TraceConfig("-excluded", "");
+ EXPECT_STREQ("-excluded", tc.ToCategoryFilterString().c_str());
+ EXPECT_FALSE(tc.IsCategoryGroupEnabled("excluded,disabled-by-default-cc"));
}
TEST(TraceConfigTest, IsEmptyOrContainsLeadingOrTrailingWhitespace) {
« no previous file with comments | « base/trace_event/trace_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698