Chromium Code Reviews| Index: chrome/test/base/test_log_collector_win.h |
| diff --git a/chrome/test/base/test_log_collector_win.h b/chrome/test/base/test_log_collector_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d26f22d71f1a157a6f1d7c7a607fd1bb5c43159b |
| --- /dev/null |
| +++ b/chrome/test/base/test_log_collector_win.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +// The test log collector uses Event Tracing for Windows to collect all LOG() |
| +// events at all levels (including all VLOG levels) from Chrome, Chrome Frame, |
| +// and the test executable itself for each test into a temporary log file. At |
| +// the conclusion of each test, the contents of the log file are regurgitated to |
| +// stderr iff the test failed. In any case, the log file is promptly deleted. |
| +// |
| +// Test executables that wish to benefit from the collector's features (to |
| +// produce verbose logs on test failure to aid in diagnosing flaky and/or |
| +// failing tests, for example) must install the collector via |
| +// |InstallTestLogCollector| before running tests (via RUN_ALL_TESTS(), |
| +// TestSuite::Run(), etc). |
| + |
| +#ifndef CHROME_TEST_BASE_TEST_LOG_COLLECTOR_WIN_H_ |
| +#define CHROME_TEST_BASE_TEST_LOG_COLLECTOR_WIN_H_ |
| +#pragma once |
| + |
| +namespace testing { |
| +class UnitTest; |
| +} |
| + |
| +// Installs the test log collector into |unit_test|. The collector cannot be |
|
erikwright (departed)
2012/03/02 20:47:59
I infer that testing::UnitTest does not map to a s
grt (UTC plus 2)
2012/03/02 21:22:43
Correct. testing::UnitTest is the process-wide si
erikwright (departed)
2012/03/03 02:04:56
The comment at the top was relatively clear. It di
grt (UTC plus 2)
2012/03/03 02:31:59
I've had my head so far up Google Test's behind th
|
| +// installed in more than one unit test, although installation in the same is |
| +// idempotent. |
| +void InstallTestLogCollector(testing::UnitTest* unit_test); |
| + |
| +#endif // CHROME_TEST_BASE_TEST_LOG_COLLECTOR_WIN_H_ |