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

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

Issue 4517004: Move Windows-specific Event Tracing for Windows implementation to base/win. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixed another ETW user in Chrome Frame Created 10 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 | Annotate | Revision Log
« no previous file with comments | « base/debug/trace_event_win.cc ('k') | base/event_trace_consumer_win.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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.h" 5 #include "base/debug/trace_event.h"
6 6
7 #include <strstream> 7 #include <strstream>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/event_trace_consumer_win.h" 12 #include "base/win/event_trace_consumer.h"
13 #include "base/event_trace_controller_win.h" 13 #include "base/win/event_trace_controller.h"
14 #include "base/win/windows_version.h" 14 #include "base/win/windows_version.h"
15 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include <initguid.h> // NOLINT - must be last include. 17 #include <initguid.h> // NOLINT - must be last include.
18 18
19 namespace base { 19 namespace base {
20 namespace debug { 20 namespace debug {
21 21
22 namespace { 22 namespace {
23 23
24 using testing::_; 24 using testing::_;
25 using testing::AnyNumber; 25 using testing::AnyNumber;
26 using testing::InSequence; 26 using testing::InSequence;
27 using testing::Ge; 27 using testing::Ge;
28 using testing::Le; 28 using testing::Le;
29 using testing::NotNull; 29 using testing::NotNull;
30 30
31 using base::win::EtwEventType;
32 using base::win::EtwTraceConsumerBase;
33 using base::win::EtwTraceController;
34 using base::win::EtwTraceProperties;
35
31 // Data for unittests traces. 36 // Data for unittests traces.
32 const char kEmpty[] = ""; 37 const char kEmpty[] = "";
33 const char kName[] = "unittest.trace_name"; 38 const char kName[] = "unittest.trace_name";
34 const char kExtra[] = "UnittestDummyExtraString"; 39 const char kExtra[] = "UnittestDummyExtraString";
35 const void* kId = kName; 40 const void* kId = kName;
36 41
37 const wchar_t kTestSessionName[] = L"TraceEvent unittest session"; 42 const wchar_t kTestSessionName[] = L"TraceEvent unittest session";
38 43
39 MATCHER_P(BufferStartsWith, str, "Buffer starts with") { 44 MATCHER_P(BufferStartsWith, str, "Buffer starts with") {
40 return memcmp(arg, str.c_str(), str.length()) == 0; 45 return memcmp(arg, str.c_str(), str.length()) == 0;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 kTraceEventTypeInstant, 304 kTraceEventTypeInstant,
300 kName, strlen(kName), 305 kName, strlen(kName),
301 kId, 306 kId,
302 kExtra, strlen(kExtra)); 307 kExtra, strlen(kExtra));
303 308
304 PlayLog(); 309 PlayLog();
305 } 310 }
306 311
307 } // namespace debug 312 } // namespace debug
308 } // namespace base 313 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/trace_event_win.cc ('k') | base/event_trace_consumer_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698