| 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/event_trace_provider_win.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/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; |
| 14 using base::win::EtwMofEvent; |
| 15 |
| 13 // {7F0FD37F-FA3C-4cd6-9242-DF60967A2CB2} | 16 // {7F0FD37F-FA3C-4cd6-9242-DF60967A2CB2} |
| 14 DEFINE_GUID(kTestProvider, | 17 DEFINE_GUID(kTestProvider, |
| 15 0x7f0fd37f, 0xfa3c, 0x4cd6, 0x92, 0x42, 0xdf, 0x60, 0x96, 0x7a, 0x2c, 0xb2); | 18 0x7f0fd37f, 0xfa3c, 0x4cd6, 0x92, 0x42, 0xdf, 0x60, 0x96, 0x7a, 0x2c, 0xb2); |
| 16 | 19 |
| 17 // {7F0FD37F-FA3C-4cd6-9242-DF60967A2CB2} | 20 // {7F0FD37F-FA3C-4cd6-9242-DF60967A2CB2} |
| 18 DEFINE_GUID(kTestEventClass, | 21 DEFINE_GUID(kTestEventClass, |
| 19 0x7f0fd37f, 0xfa3c, 0x4cd6, 0x92, 0x42, 0xdf, 0x60, 0x96, 0x7a, 0x2c, 0xb2); | 22 0x7f0fd37f, 0xfa3c, 0x4cd6, 0x92, 0x42, 0xdf, 0x60, 0x96, 0x7a, 0x2c, 0xb2); |
| 20 | 23 |
| 21 } // namespace | 24 } // namespace |
| 22 | 25 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 EXPECT_NE(NULL, provider.registration_handle()); | 101 EXPECT_NE(NULL, provider.registration_handle()); |
| 99 | 102 |
| 100 // No session so far. | 103 // No session so far. |
| 101 EXPECT_EQ(NULL, provider.session_handle()); | 104 EXPECT_EQ(NULL, provider.session_handle()); |
| 102 EXPECT_EQ(0, provider.enable_flags()); | 105 EXPECT_EQ(0, provider.enable_flags()); |
| 103 EXPECT_EQ(0, provider.enable_level()); | 106 EXPECT_EQ(0, provider.enable_level()); |
| 104 | 107 |
| 105 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister()); | 108 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister()); |
| 106 EXPECT_EQ(NULL, provider.registration_handle()); | 109 EXPECT_EQ(NULL, provider.registration_handle()); |
| 107 } | 110 } |
| OLD | NEW |