OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "components/tracing/trace_config_file.h" | 9 #include "components/tracing/browser/trace_config_file.h" |
10 #include "components/tracing/tracing_switches.h" | 10 #include "components/tracing/common/tracing_switches.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace tracing { | 13 namespace tracing { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const char kTraceConfig[] = | 17 const char kTraceConfig[] = |
18 "{" | 18 "{" |
19 "\"enable_argument_filter\":true," | 19 "\"enable_argument_filter\":true," |
20 "\"enable_sampling\":true," | 20 "\"enable_sampling\":true," |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 242 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
243 ASSERT_TRUE( | 243 ASSERT_TRUE( |
244 base::CreateTemporaryFileInDir(temp_dir.path(), &trace_config_file)); | 244 base::CreateTemporaryFileInDir(temp_dir.path(), &trace_config_file)); |
245 base::CommandLine::ForCurrentProcess()->AppendSwitchPath( | 245 base::CommandLine::ForCurrentProcess()->AppendSwitchPath( |
246 switches::kTraceConfigFile, trace_config_file); | 246 switches::kTraceConfigFile, trace_config_file); |
247 | 247 |
248 EXPECT_FALSE(TraceConfigFile::GetInstance()->IsEnabled()); | 248 EXPECT_FALSE(TraceConfigFile::GetInstance()->IsEnabled()); |
249 } | 249 } |
250 | 250 |
251 } // namespace tracing | 251 } // namespace tracing |
OLD | NEW |