summaryrefslogtreecommitdiffstats
path: root/base/trace_event_win_unittest.cc
diff options
context:
space:
mode:
authorsiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 18:32:13 +0000
committersiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 18:32:13 +0000
commit310a5b44afee9d63c37780b60c9260918b46b553 (patch)
tree858a64f511cd58f0d03dbb5061e35dd839b164dc /base/trace_event_win_unittest.cc
parent2c699655d5ed9cbf296a9389c3efe2a9fe01973e (diff)
downloadchromium_src-310a5b44afee9d63c37780b60c9260918b46b553.zip
chromium_src-310a5b44afee9d63c37780b60c9260918b46b553.tar.gz
chromium_src-310a5b44afee9d63c37780b60c9260918b46b553.tar.bz2
Fix event tracing for windows test flakyness.
Assert on non-null properties to the static members of the trace controller. Fix usage of same. Add a PostEventsDisabled method to trace producer to which allows for a non-racy enable/disable test. BUG=52388 BUG=59328 TEST=Unittests in the change. Review URL: http://codereview.chromium.org/3800006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/trace_event_win_unittest.cc')
-rw-r--r--base/trace_event_win_unittest.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/base/trace_event_win_unittest.cc b/base/trace_event_win_unittest.cc
index a142af1..1335bed 100644
--- a/base/trace_event_win_unittest.cc
+++ b/base/trace_event_win_unittest.cc
@@ -79,6 +79,13 @@ class TraceEventTest: public testing::Test {
void SetUp() {
bool is_xp = base::win::GetVersion() < base::win::VERSION_VISTA;
+ if (is_xp) {
+ // Tear down any dangling session from an earlier failing test.
+ EtwTraceProperties ignore;
+
+ EtwTraceController::Stop(kTestSessionName, &ignore);
+ }
+
// Resurrect and initialize the TraceLog singleton instance.
// On Vista and better, we need the provider registered before we
// start the private, in-proc session, but on XP we need the global
@@ -254,8 +261,7 @@ TEST_F(TraceEventTest, TraceLog) {
PlayLog();
}
-// Marked flaky per http://crbug.com/52388
-TEST_F(TraceEventTest, FLAKY_Macros) {
+TEST_F(TraceEventTest, Macros) {
ExpectPlayLog();
// The events should arrive in the same sequence as the expects.