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

Side by Side Diff: base/win/event_trace_consumer_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 consumer base class. 5 // Unit tests for event trace consumer base class.
6 #include "base/win/event_trace_consumer.h" 6 #include "base/win/event_trace_consumer.h"
7 7
8 #include <list> 8 #include <list>
9 9
10 #include <objbase.h> 10 #include <objbase.h>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 private: 72 private:
73 DISALLOW_COPY_AND_ASSIGN(TestConsumer); 73 DISALLOW_COPY_AND_ASSIGN(TestConsumer);
74 }; 74 };
75 75
76 ScopedHandle TestConsumer::sank_event_; 76 ScopedHandle TestConsumer::sank_event_;
77 EventQueue TestConsumer::events_; 77 EventQueue TestConsumer::events_;
78 78
79 class EtwTraceConsumerBaseTest: public testing::Test { 79 class EtwTraceConsumerBaseTest: public testing::Test {
80 public: 80 public:
81 EtwTraceConsumerBaseTest() 81 EtwTraceConsumerBaseTest()
82 : session_name_(StringPrintf(L"TestSession-%d", GetCurrentProcId())) { 82 : session_name_(L""/*StringPrintf(L"TestSession-%d", GetCurrentProcId())*/ ) {
83 } 83 }
84 84
85 void SetUp() override { 85 void SetUp() override {
86 // Cleanup any potentially dangling sessions. 86 // Cleanup any potentially dangling sessions.
87 EtwTraceProperties ignore; 87 EtwTraceProperties ignore;
88 EtwTraceController::Stop(session_name_.c_str(), &ignore); 88 EtwTraceController::Stop(session_name_.c_str(), &ignore);
89 89
90 // Allocate a new GUID for each provider test. 90 // Allocate a new GUID for each provider test.
91 ASSERT_HRESULT_SUCCEEDED(::CoCreateGuid(&test_provider_)); 91 ASSERT_HRESULT_SUCCEEDED(::CoCreateGuid(&test_provider_));
92 } 92 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return; 357 return;
358 } 358 }
359 ASSERT_HRESULT_SUCCEEDED(hr) << "RoundTripEvent failed"; 359 ASSERT_HRESULT_SUCCEEDED(hr) << "RoundTripEvent failed";
360 ASSERT_TRUE(trace != NULL); 360 ASSERT_TRUE(trace != NULL);
361 ASSERT_EQ(sizeof(kData), trace->MofLength); 361 ASSERT_EQ(sizeof(kData), trace->MofLength);
362 ASSERT_STREQ(kData, reinterpret_cast<const char*>(trace->MofData)); 362 ASSERT_STREQ(kData, reinterpret_cast<const char*>(trace->MofData));
363 } 363 }
364 364
365 } // namespace win 365 } // namespace win
366 } // namespace base 366 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698