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

Side by Side Diff: base/debug/trace_event_unittest.cc

Issue 14320028: Restore skipping of default categories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/debug/trace_event_unittest.h" 5 #include "base/debug/trace_event_unittest.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 EXPECT_TRUE(std::find(cat_groups.begin(), 893 EXPECT_TRUE(std::find(cat_groups.begin(),
894 cat_groups.end(), "c2") != cat_groups.end()); 894 cat_groups.end(), "c2") != cat_groups.end());
895 EXPECT_TRUE(std::find(cat_groups.begin(), 895 EXPECT_TRUE(std::find(cat_groups.begin(),
896 cat_groups.end(), "c3") != cat_groups.end()); 896 cat_groups.end(), "c3") != cat_groups.end());
897 EXPECT_TRUE(std::find(cat_groups.begin(), 897 EXPECT_TRUE(std::find(cat_groups.begin(),
898 cat_groups.end(), "c4") != cat_groups.end()); 898 cat_groups.end(), "c4") != cat_groups.end());
899 EXPECT_TRUE(std::find(cat_groups.begin(), 899 EXPECT_TRUE(std::find(cat_groups.begin(),
900 cat_groups.end(), "c5,c6") != cat_groups.end()); 900 cat_groups.end(), "c5,c6") != cat_groups.end());
901 EXPECT_TRUE(std::find(cat_groups.begin(), 901 EXPECT_TRUE(std::find(cat_groups.begin(),
902 cat_groups.end(), "c7,c8") != cat_groups.end()); 902 cat_groups.end(), "c7,c8") != cat_groups.end());
903 // Make sure metadata isn't returned.
904 EXPECT_TRUE(std::find(cat_groups.begin(),
905 cat_groups.end(), "__metadata") == cat_groups.end());
903 906
904 const std::vector<std::string> empty_categories; 907 const std::vector<std::string> empty_categories;
905 std::vector<std::string> included_categories; 908 std::vector<std::string> included_categories;
906 std::vector<std::string> excluded_categories; 909 std::vector<std::string> excluded_categories;
907 910
908 // Test that category filtering works. 911 // Test that category filtering works.
909 912
910 // Include nonexistent category -> no events 913 // Include nonexistent category -> no events
911 Clear(); 914 Clear();
912 included_categories.clear(); 915 included_categories.clear();
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( 1790 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace(
1788 " bad_category ")); 1791 " bad_category "));
1789 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( 1792 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace(
1790 "")); 1793 ""));
1791 EXPECT_FALSE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( 1794 EXPECT_FALSE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace(
1792 "good_category")); 1795 "good_category"));
1793 } 1796 }
1794 1797
1795 } // namespace debug 1798 } // namespace debug
1796 } // namespace base 1799 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698