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

Side by Side Diff: base/event_trace_provider_win_unittest.cc

Issue 2081007: Enable warning 4389 as an error on windows builds. This will make... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months 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/event_trace_controller_win_unittest.cc ('k') | base/file_util_win.cc » ('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) 2009 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/event_trace_provider_win.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 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 ASSERT_EQ(ERROR_SUCCESS, provider.Register()); 82 ASSERT_EQ(ERROR_SUCCESS, provider.Register());
83 EXPECT_NE(NULL, provider.registration_handle()); 83 EXPECT_NE(NULL, provider.registration_handle());
84 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister()); 84 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister());
85 EXPECT_EQ(NULL, provider.registration_handle()); 85 EXPECT_EQ(NULL, provider.registration_handle());
86 } 86 }
87 87
88 TEST(EtwTraceProviderTest, RegisterWithNoNameFails) { 88 TEST(EtwTraceProviderTest, RegisterWithNoNameFails) {
89 EtwTraceProvider provider; 89 EtwTraceProvider provider;
90 90
91 EXPECT_NE(ERROR_SUCCESS, provider.Register()); 91 EXPECT_TRUE(provider.Register() != ERROR_SUCCESS);
92 } 92 }
93 93
94 TEST(EtwTraceProviderTest, Enable) { 94 TEST(EtwTraceProviderTest, Enable) {
95 EtwTraceProvider provider(kTestProvider); 95 EtwTraceProvider provider(kTestProvider);
96 96
97 ASSERT_EQ(ERROR_SUCCESS, provider.Register()); 97 ASSERT_EQ(ERROR_SUCCESS, provider.Register());
98 EXPECT_NE(NULL, provider.registration_handle()); 98 EXPECT_NE(NULL, provider.registration_handle());
99 99
100 // No session so far. 100 // No session so far.
101 EXPECT_EQ(NULL, provider.session_handle()); 101 EXPECT_EQ(NULL, provider.session_handle());
102 EXPECT_EQ(0, provider.enable_flags()); 102 EXPECT_EQ(0, provider.enable_flags());
103 EXPECT_EQ(0, provider.enable_level()); 103 EXPECT_EQ(0, provider.enable_level());
104 104
105 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister()); 105 ASSERT_EQ(ERROR_SUCCESS, provider.Unregister());
106 EXPECT_EQ(NULL, provider.registration_handle()); 106 EXPECT_EQ(NULL, provider.registration_handle());
107 } 107 }
OLDNEW
« no previous file with comments | « base/event_trace_controller_win_unittest.cc ('k') | base/file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698