OLD | NEW |
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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 TEST_F(TraceEventTestFixture, TraceOptionsParsing) { | 1774 TEST_F(TraceEventTestFixture, TraceOptionsParsing) { |
1775 ManualTestSetUp(); | 1775 ManualTestSetUp(); |
1776 | 1776 |
1777 EXPECT_EQ(TraceLog::RECORD_UNTIL_FULL, | 1777 EXPECT_EQ(TraceLog::RECORD_UNTIL_FULL, |
1778 TraceLog::TraceOptionsFromString(std::string())); | 1778 TraceLog::TraceOptionsFromString(std::string())); |
1779 | 1779 |
1780 EXPECT_EQ(TraceLog::RECORD_UNTIL_FULL, | 1780 EXPECT_EQ(TraceLog::RECORD_UNTIL_FULL, |
1781 TraceLog::TraceOptionsFromString("record-until-full")); | 1781 TraceLog::TraceOptionsFromString("record-until-full")); |
1782 EXPECT_EQ(TraceLog::RECORD_CONTINUOUSLY, | 1782 EXPECT_EQ(TraceLog::RECORD_CONTINUOUSLY, |
1783 TraceLog::TraceOptionsFromString("record-continuously")); | 1783 TraceLog::TraceOptionsFromString("record-continuously")); |
| 1784 EXPECT_EQ(TraceLog::RECORD_UNTIL_FULL | TraceLog::ENABLE_SAMPLING, |
| 1785 TraceLog::TraceOptionsFromString("enable-sampling")); |
| 1786 EXPECT_EQ(TraceLog::RECORD_CONTINUOUSLY | TraceLog::ENABLE_SAMPLING, |
| 1787 TraceLog::TraceOptionsFromString( |
| 1788 "record-continuously,enable-sampling")); |
1784 } | 1789 } |
1785 | 1790 |
1786 // Not supported in split dll build. http://crbug.com/237249 | 1791 // Not supported in split dll build. http://crbug.com/237249 |
1787 #if !defined(CHROME_SPLIT_DLL) | 1792 #if !defined(CHROME_SPLIT_DLL) |
1788 TEST_F(TraceEventTestFixture, TraceSampling) { | 1793 TEST_F(TraceEventTestFixture, TraceSampling) { |
1789 ManualTestSetUp(); | 1794 ManualTestSetUp(); |
1790 | 1795 |
1791 event_watch_notification_ = 0; | 1796 event_watch_notification_ = 0; |
1792 TraceLog::GetInstance()->SetEnabled( | 1797 TraceLog::GetInstance()->SetEnabled( |
1793 CategoryFilter("*"), | 1798 CategoryFilter("*"), |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( | 2097 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( |
2093 " bad_category ")); | 2098 " bad_category ")); |
2094 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( | 2099 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( |
2095 "")); | 2100 "")); |
2096 EXPECT_FALSE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( | 2101 EXPECT_FALSE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( |
2097 "good_category")); | 2102 "good_category")); |
2098 } | 2103 } |
2099 | 2104 |
2100 } // namespace debug | 2105 } // namespace debug |
2101 } // namespace base | 2106 } // namespace base |
OLD | NEW |