OLD | NEW |
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 #include "chrome/test/logging/win/test_log_collector.h" | 5 #include "chrome/test/logging/win/test_log_collector.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <ios> | 10 #include <ios> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/files/scoped_temp_dir.h" | 16 #include "base/files/scoped_temp_dir.h" |
17 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/macros.h" |
19 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
20 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
21 #include "chrome/test/base/test_switches.h" | 22 #include "chrome/test/base/test_switches.h" |
22 #include "chrome/test/logging/win/file_logger.h" | 23 #include "chrome/test/logging/win/file_logger.h" |
23 #include "chrome/test/logging/win/log_file_printer.h" | 24 #include "chrome/test/logging/win/log_file_printer.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
25 | 26 |
26 namespace logging_win { | 27 namespace logging_win { |
27 | 28 |
28 namespace { | 29 namespace { |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 279 |
279 void InstallTestLogCollector(testing::UnitTest* unit_test) { | 280 void InstallTestLogCollector(testing::UnitTest* unit_test) { |
280 // Must be called before running any tests. | 281 // Must be called before running any tests. |
281 DCHECK(unit_test); | 282 DCHECK(unit_test); |
282 DCHECK(!unit_test->current_test_case()); | 283 DCHECK(!unit_test->current_test_case()); |
283 | 284 |
284 g_test_log_collector.Get().Initialize(unit_test); | 285 g_test_log_collector.Get().Initialize(unit_test); |
285 } | 286 } |
286 | 287 |
287 } // namespace logging_win | 288 } // namespace logging_win |
OLD | NEW |