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

Side by Side Diff: base/win/event_trace_controller_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/win/event_trace_controller.cc ('k') | base/win/event_trace_provider.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 // Unit tests for event trace controller. 5 // Unit tests for event trace controller.
6 #include "base/event_trace_controller_win.h" 6 #include "base/win/event_trace_controller.h"
7 #include "base/event_trace_provider_win.h" 7 #include "base/win/event_trace_provider.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/scoped_handle.h" 11 #include "base/scoped_handle.h"
12 #include "base/sys_info.h" 12 #include "base/sys_info.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include <initguid.h> // NOLINT - must be last. 14 #include <initguid.h> // NOLINT - must be last.
15 15
16 namespace { 16 namespace {
17 17
18 using base::win::EtwTraceController;
19 using base::win::EtwTraceProvider;
20 using base::win::EtwTraceProperties;
21
18 const wchar_t kTestSessionName[] = L"TestLogSession"; 22 const wchar_t kTestSessionName[] = L"TestLogSession";
19 23
20 // {0D236A42-CD18-4e3d-9975-DCEEA2106E05} 24 // {0D236A42-CD18-4e3d-9975-DCEEA2106E05}
21 DEFINE_GUID(kTestProvider, 25 DEFINE_GUID(kTestProvider,
22 0xd236a42, 0xcd18, 0x4e3d, 0x99, 0x75, 0xdc, 0xee, 0xa2, 0x10, 0x6e, 0x5); 26 0xd236a42, 0xcd18, 0x4e3d, 0x99, 0x75, 0xdc, 0xee, 0xa2, 0x10, 0x6e, 0x5);
23 27
24 DEFINE_GUID(kGuidNull, 28 DEFINE_GUID(kGuidNull,
25 0x0000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0); 29 0x0000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0);
26 30
27 const ULONG kTestProviderFlags = 0xCAFEBABE; 31 const ULONG kTestProviderFlags = 0xCAFEBABE;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 EXPECT_EQ(kTestProviderFlags, provider.enable_flags()); 199 EXPECT_EQ(kTestProviderFlags, provider.enable_flags());
196 200
197 EXPECT_HRESULT_SUCCEEDED(controller.Stop(NULL)); 201 EXPECT_HRESULT_SUCCEEDED(controller.Stop(NULL));
198 202
199 provider.WaitForCallback(); 203 provider.WaitForCallback();
200 204
201 // Session should have wound down. 205 // Session should have wound down.
202 EXPECT_EQ(0, provider.enable_level()); 206 EXPECT_EQ(0, provider.enable_level());
203 EXPECT_EQ(0, provider.enable_flags()); 207 EXPECT_EQ(0, provider.enable_flags());
204 } 208 }
OLDNEW
« no previous file with comments | « base/win/event_trace_controller.cc ('k') | base/win/event_trace_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698