| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 TraceLog::GetInstance()->Flush( | 91 TraceLog::GetInstance()->Flush( |
| 92 base::Bind(&TraceEventTestFixture::OnTraceDataCollected, | 92 base::Bind(&TraceEventTestFixture::OnTraceDataCollected, |
| 93 base::Unretained(this))); | 93 base::Unretained(this))); |
| 94 } | 94 } |
| 95 | 95 |
| 96 virtual void SetUp() OVERRIDE { | 96 virtual void SetUp() OVERRIDE { |
| 97 const char* name = PlatformThread::GetName(); | 97 const char* name = PlatformThread::GetName(); |
| 98 old_thread_name_ = name ? strdup(name) : NULL; | 98 old_thread_name_ = name ? strdup(name) : NULL; |
| 99 notifications_received_ = 0; | 99 notifications_received_ = 0; |
| 100 } | 100 } |
| 101 |
| 101 virtual void TearDown() OVERRIDE { | 102 virtual void TearDown() OVERRIDE { |
| 102 if (TraceLog::GetInstance()) | 103 if (TraceLog::GetInstance()) |
| 103 EXPECT_FALSE(TraceLog::GetInstance()->IsEnabled()); | 104 EXPECT_FALSE(TraceLog::GetInstance()->IsEnabled()); |
| 104 PlatformThread::SetName(old_thread_name_ ? old_thread_name_ : ""); | 105 PlatformThread::SetName(old_thread_name_ ? old_thread_name_ : ""); |
| 105 free(old_thread_name_); | 106 free(old_thread_name_); |
| 106 old_thread_name_ = NULL; | 107 old_thread_name_ = NULL; |
| 107 } | 108 } |
| 108 | 109 |
| 109 char* old_thread_name_; | 110 char* old_thread_name_; |
| 110 ListValue trace_parsed_; | 111 ListValue trace_parsed_; |
| (...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( | 1994 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( |
| 1994 " bad_category ")); | 1995 " bad_category ")); |
| 1995 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( | 1996 EXPECT_TRUE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( |
| 1996 "")); | 1997 "")); |
| 1997 EXPECT_FALSE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( | 1998 EXPECT_FALSE(CategoryFilter::IsEmptyOrContainsLeadingOrTrailingWhitespace( |
| 1998 "good_category")); | 1999 "good_category")); |
| 1999 } | 2000 } |
| 2000 | 2001 |
| 2001 } // namespace debug | 2002 } // namespace debug |
| 2002 } // namespace base | 2003 } // namespace base |
| OLD | NEW |