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

Side by Side Diff: base/win/event_trace_controller_unittest.cc

Issue 1410333006: Enough hacks to make wstring printfs unneeded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 6
7 #include <objbase.h> 7 #include <objbase.h>
8 #include <initguid.h> 8 #include <initguid.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 std::wstring name2(1024, L'A'); 100 std::wstring name2(1024, L'A');
101 ASSERT_HRESULT_FAILED(prop.SetLoggerFileName(name2.c_str())); 101 ASSERT_HRESULT_FAILED(prop.SetLoggerFileName(name2.c_str()));
102 ASSERT_HRESULT_FAILED(prop.SetLoggerName(name2.c_str())); 102 ASSERT_HRESULT_FAILED(prop.SetLoggerName(name2.c_str()));
103 } 103 }
104 104
105 namespace { 105 namespace {
106 106
107 class EtwTraceControllerTest : public testing::Test { 107 class EtwTraceControllerTest : public testing::Test {
108 public: 108 public:
109 EtwTraceControllerTest() 109 EtwTraceControllerTest()
110 : session_name_(StringPrintf(L"TestSession-%d", GetCurrentProcId())) { 110 : session_name_(L""/*StringPrintf(L"TestSession-%d", GetCurrentProcId())*/ ) {
111 } 111 }
112 112
113 void SetUp() override { 113 void SetUp() override {
114 EtwTraceProperties ignore; 114 EtwTraceProperties ignore;
115 EtwTraceController::Stop(session_name_.c_str(), &ignore); 115 EtwTraceController::Stop(session_name_.c_str(), &ignore);
116 116
117 // Allocate a new provider name GUID for each test. 117 // Allocate a new provider name GUID for each test.
118 ASSERT_HRESULT_SUCCEEDED(::CoCreateGuid(&test_provider_)); 118 ASSERT_HRESULT_SUCCEEDED(::CoCreateGuid(&test_provider_));
119 } 119 }
120 120
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 provider.WaitForCallback(); 234 provider.WaitForCallback();
235 235
236 // Session should have wound down. 236 // Session should have wound down.
237 EXPECT_EQ(0, provider.enable_level()); 237 EXPECT_EQ(0, provider.enable_level());
238 EXPECT_EQ(0, provider.enable_flags()); 238 EXPECT_EQ(0, provider.enable_flags());
239 } 239 }
240 } 240 }
241 241
242 } // namespace win 242 } // namespace win
243 } // namespace base 243 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698