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

Side by Side Diff: test/cctest/libplatform/test-tracing.cc

Issue 2462143002: [Tracing] Remove unused excluded categories list. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/libplatform/tracing/trace-config.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 #include <limits> 4 #include <limits>
5 5
6 #include "include/libplatform/v8-tracing.h" 6 #include "include/libplatform/v8-tracing.h"
7 #include "src/tracing/trace-event.h" 7 #include "src/tracing/trace-event.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace platform { 11 namespace platform {
12 namespace tracing { 12 namespace tracing {
13 13
14 TEST(TestTraceConfig) { 14 TEST(TestTraceConfig) {
15 LocalContext env; 15 LocalContext env;
16 TraceConfig* trace_config = new TraceConfig(); 16 TraceConfig* trace_config = new TraceConfig();
17 trace_config->AddIncludedCategory("v8"); 17 trace_config->AddIncludedCategory("v8");
18 trace_config->AddIncludedCategory(TRACE_DISABLED_BY_DEFAULT("v8.runtime")); 18 trace_config->AddIncludedCategory(TRACE_DISABLED_BY_DEFAULT("v8.runtime"));
19 trace_config->AddExcludedCategory("v8.cpu_profile");
20 19
21 CHECK_EQ(trace_config->IsSystraceEnabled(), false); 20 CHECK_EQ(trace_config->IsSystraceEnabled(), false);
22 CHECK_EQ(trace_config->IsArgumentFilterEnabled(), false); 21 CHECK_EQ(trace_config->IsArgumentFilterEnabled(), false);
23 CHECK_EQ(trace_config->IsCategoryGroupEnabled("v8"), true); 22 CHECK_EQ(trace_config->IsCategoryGroupEnabled("v8"), true);
24 CHECK_EQ(trace_config->IsCategoryGroupEnabled("v8.cpu_profile"), false); 23 CHECK_EQ(trace_config->IsCategoryGroupEnabled("v8.cpu_profile"), false);
25 CHECK_EQ(trace_config->IsCategoryGroupEnabled("v8.cpu_profile.hires"), false); 24 CHECK_EQ(trace_config->IsCategoryGroupEnabled("v8.cpu_profile.hires"), false);
26 CHECK_EQ(trace_config->IsCategoryGroupEnabled( 25 CHECK_EQ(trace_config->IsCategoryGroupEnabled(
27 TRACE_DISABLED_BY_DEFAULT("v8.runtime")), 26 TRACE_DISABLED_BY_DEFAULT("v8.runtime")),
28 true); 27 true);
29 delete trace_config; 28 delete trace_config;
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 398
400 CHECK_EQ(1, observer.enabled_count); 399 CHECK_EQ(1, observer.enabled_count);
401 CHECK_EQ(1, observer.disabled_count); 400 CHECK_EQ(1, observer.disabled_count);
402 401
403 i::V8::SetPlatformForTesting(old_platform); 402 i::V8::SetPlatformForTesting(old_platform);
404 } 403 }
405 404
406 } // namespace tracing 405 } // namespace tracing
407 } // namespace platform 406 } // namespace platform
408 } // namespace v8 407 } // namespace v8
OLDNEW
« no previous file with comments | « src/libplatform/tracing/trace-config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698