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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/files/file_path.cc » ('j') | 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 <math.h> 7 #include <math.h>
8 #include <cstdlib> 8 #include <cstdlib>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 TRACE_EVENT_SCOPE_THREAD); 1608 TRACE_EVENT_SCOPE_THREAD);
1609 TRACE_EVENT_INSTANT0("other_included", "second", TRACE_EVENT_SCOPE_THREAD); 1609 TRACE_EVENT_INSTANT0("other_included", "second", TRACE_EVENT_SCOPE_THREAD);
1610 EndTraceAndFlush(); 1610 EndTraceAndFlush();
1611 1611
1612 { 1612 {
1613 const DictionaryValue* item = NULL; 1613 const DictionaryValue* item = NULL;
1614 ListValue& trace_parsed = trace_parsed_; 1614 ListValue& trace_parsed = trace_parsed_;
1615 EXPECT_FIND_("disabled-by-default-cc"); 1615 EXPECT_FIND_("disabled-by-default-cc");
1616 EXPECT_FIND_("other_included"); 1616 EXPECT_FIND_("other_included");
1617 } 1617 }
1618
1619 Clear();
1620
1621 BeginSpecificTrace("other_included");
1622 TRACE_EVENT_INSTANT0(TRACE_DISABLED_BY_DEFAULT("cc") ",other_included",
1623 "first", TRACE_EVENT_SCOPE_THREAD);
1624 TRACE_EVENT_INSTANT0("other_included," TRACE_DISABLED_BY_DEFAULT("cc"),
1625 "second", TRACE_EVENT_SCOPE_THREAD);
1626 EndTraceAndFlush();
1627
1628 {
1629 const DictionaryValue* item = NULL;
1630 ListValue& trace_parsed = trace_parsed_;
1631 EXPECT_FIND_("disabled-by-default-cc,other_included");
1632 EXPECT_FIND_("other_included,disabled-by-default-cc");
1633 }
1618 } 1634 }
1619 1635
1620 TEST_F(TraceEventTestFixture, NormallyNoDeepCopy) { 1636 TEST_F(TraceEventTestFixture, NormallyNoDeepCopy) {
1621 // Test that the TRACE_EVENT macros do not deep-copy their string. If they 1637 // Test that the TRACE_EVENT macros do not deep-copy their string. If they
1622 // do so it may indicate a performance regression, but more-over it would 1638 // do so it may indicate a performance regression, but more-over it would
1623 // make the DEEP_COPY overloads redundant. 1639 // make the DEEP_COPY overloads redundant.
1624 std::string name_string("event name"); 1640 std::string name_string("event name");
1625 1641
1626 BeginTrace(); 1642 BeginTrace();
1627 TRACE_EVENT_INSTANT0("category", name_string.c_str(), 1643 TRACE_EVENT_INSTANT0("category", name_string.c_str(),
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
3068 EXPECT_EQ(original_option.enable_sampling, new_options.enable_sampling); 3084 EXPECT_EQ(original_option.enable_sampling, new_options.enable_sampling);
3069 EXPECT_EQ(original_option.enable_systrace, new_options.enable_systrace); 3085 EXPECT_EQ(original_option.enable_systrace, new_options.enable_systrace);
3070 } 3086 }
3071 } 3087 }
3072 } 3088 }
3073 } 3089 }
3074 3090
3075 3091
3076 } // namespace debug 3092 } // namespace debug
3077 } // namespace base 3093 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/files/file_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698