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

Unified Diff: base/debug/trace_event_win_unittest.cc

Issue 6955006: Revert 84486 - Merge gpu_trace_event back into base/debug/trace_event.Initial land attempt at htt... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/trace_event_win.cc ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_win_unittest.cc
===================================================================
--- base/debug/trace_event_win_unittest.cc (revision 84493)
+++ base/debug/trace_event_win_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,11 +9,8 @@
#include "base/at_exit.h"
#include "base/basictypes.h"
#include "base/file_util.h"
-#include "base/debug/trace_event.h"
-#include "base/debug/trace_event_win.h"
#include "base/win/event_trace_consumer.h"
#include "base/win/event_trace_controller.h"
-#include "base/win/event_trace_provider.h"
#include "base/win/windows_version.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -87,9 +84,9 @@
TestEventConsumer* TestEventConsumer::current_ = NULL;
-class TraceEventWinTest: public testing::Test {
+class TraceEventTest: public testing::Test {
public:
- TraceEventWinTest() {
+ TraceEventTest() {
}
void SetUp() {
@@ -106,10 +103,10 @@
// start the private, in-proc session, but on XP we need the global
// session created and the provider enabled before we register our
// provider.
- TraceEventETWProvider* tracelog = NULL;
+ TraceLog* tracelog = NULL;
if (!is_xp) {
- TraceEventETWProvider::Resurrect();
- tracelog = TraceEventETWProvider::GetInstance();
+ TraceLog::Resurrect();
+ tracelog = TraceLog::GetInstance();
ASSERT_TRUE(tracelog != NULL);
ASSERT_FALSE(tracelog->IsTracing());
}
@@ -144,8 +141,8 @@
0));
if (is_xp) {
- TraceEventETWProvider::Resurrect();
- tracelog = TraceEventETWProvider::GetInstance();
+ TraceLog::Resurrect();
+ tracelog = TraceLog::GetInstance();
}
ASSERT_TRUE(tracelog != NULL);
EXPECT_TRUE(tracelog->IsTracing());
@@ -207,16 +204,16 @@
} // namespace
-TEST_F(TraceEventWinTest, TraceLog) {
+TEST_F(TraceEventTest, TraceLog) {
ExpectPlayLog();
// The events should arrive in the same sequence as the expects.
InSequence in_sequence;
// Full argument version, passing lengths explicitly.
- TraceEventETWProvider::Trace(kName,
+ TraceLog::Trace(kName,
strlen(kName),
- base::debug::TRACE_EVENT_PHASE_BEGIN,
+ TraceLog::EVENT_BEGIN,
kId,
kExtra,
strlen(kExtra));
@@ -228,8 +225,8 @@
kExtra, strlen(kExtra));
// Const char* version.
- TraceEventETWProvider::Trace(static_cast<const char*>(kName),
- base::debug::TRACE_EVENT_PHASE_END,
+ TraceLog::Trace(static_cast<const char*>(kName),
+ TraceLog::EVENT_END,
kId,
static_cast<const char*>(kExtra));
@@ -240,8 +237,8 @@
kExtra, strlen(kExtra));
// std::string extra version.
- TraceEventETWProvider::Trace(static_cast<const char*>(kName),
- base::debug::TRACE_EVENT_PHASE_INSTANT,
+ TraceLog::Trace(static_cast<const char*>(kName),
+ TraceLog::EVENT_INSTANT,
kId,
std::string(kExtra));
@@ -253,9 +250,9 @@
// Test for sanity on NULL inputs.
- TraceEventETWProvider::Trace(NULL,
+ TraceLog::Trace(NULL,
0,
- base::debug::TRACE_EVENT_PHASE_BEGIN,
+ TraceLog::EVENT_BEGIN,
kId,
NULL,
0);
@@ -266,9 +263,9 @@
kId,
kEmpty, 0);
- TraceEventETWProvider::Trace(NULL,
+ TraceLog::Trace(NULL,
-1,
- base::debug::TRACE_EVENT_PHASE_END,
+ TraceLog::EVENT_END,
kId,
NULL,
-1);
@@ -282,27 +279,27 @@
PlayLog();
}
-TEST_F(TraceEventWinTest, Macros) {
+TEST_F(TraceEventTest, Macros) {
ExpectPlayLog();
// The events should arrive in the same sequence as the expects.
InSequence in_sequence;
- TRACE_EVENT_BEGIN_ETW(kName, kId, kExtra);
+ TRACE_EVENT_BEGIN(kName, kId, kExtra);
ExpectEvent(kTraceEventClass32,
kTraceEventTypeBegin,
kName, strlen(kName),
kId,
kExtra, strlen(kExtra));
- TRACE_EVENT_END_ETW(kName, kId, kExtra);
+ TRACE_EVENT_END(kName, kId, kExtra);
ExpectEvent(kTraceEventClass32,
kTraceEventTypeEnd,
kName, strlen(kName),
kId,
kExtra, strlen(kExtra));
- TRACE_EVENT_INSTANT_ETW(kName, kId, kExtra);
+ TRACE_EVENT_INSTANT(kName, kId, kExtra);
ExpectEvent(kTraceEventClass32,
kTraceEventTypeInstant,
kName, strlen(kName),
« no previous file with comments | « base/debug/trace_event_win.cc ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698