OLD | NEW |
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 provider. | 5 // Unit tests for event trace provider. |
6 #include "base/win/event_trace_provider.h" | 6 #include "base/win/event_trace_provider.h" |
7 #include <new> | 7 #include <new> |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/googletest/include/gtest/gtest.h" |
9 #include <initguid.h> // NOLINT - has to be last | 9 #include <initguid.h> // NOLINT - has to be last |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 using base::win::EtwTraceProvider; | 13 using base::win::EtwTraceProvider; |
14 using base::win::EtwMofEvent; | 14 using base::win::EtwMofEvent; |
15 | 15 |
16 // {7F0FD37F-FA3C-4cd6-9242-DF60967A2CB2} | 16 // {7F0FD37F-FA3C-4cd6-9242-DF60967A2CB2} |
17 DEFINE_GUID(kTestProvider, | 17 DEFINE_GUID(kTestProvider, |
18 0x7f0fd37f, 0xfa3c, 0x4cd6, 0x92, 0x42, 0xdf, 0x60, 0x96, 0x7a, 0x2c, 0xb2); | 18 0x7f0fd37f, 0xfa3c, 0x4cd6, 0x92, 0x42, 0xdf, 0x60, 0x96, 0x7a, 0x2c, 0xb2); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 EXPECT_NE(NULL, provider.registration_handle()); | 101 EXPECT_NE(NULL, provider.registration_handle()); |
102 | 102 |
103 // No session so far. | 103 // No session so far. |
104 EXPECT_EQ(NULL, provider.session_handle()); | 104 EXPECT_EQ(NULL, provider.session_handle()); |
105 EXPECT_EQ(0, provider.enable_flags()); | 105 EXPECT_EQ(0, provider.enable_flags()); |
106 EXPECT_EQ(0, provider.enable_level()); | 106 EXPECT_EQ(0, provider.enable_level()); |
107 | 107 |
108 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister()); | 108 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister()); |
109 EXPECT_EQ(NULL, provider.registration_handle()); | 109 EXPECT_EQ(NULL, provider.registration_handle()); |
110 } | 110 } |
OLD | NEW |