Chromium Code Reviews| Index: media/base/run_all_unittests.cc |
| diff --git a/media/base/run_all_unittests.cc b/media/base/run_all_unittests.cc |
| index 4dc422450c8634f3fd164e28bd3dcb172c81d2d4..e0145bd6229a34c6caa23d50a88b68ec0a1c1bc4 100644 |
| --- a/media/base/run_all_unittests.cc |
| +++ b/media/base/run_all_unittests.cc |
| @@ -10,25 +10,18 @@ |
| class TestSuiteNoAtExit : public base::TestSuite { |
| public: |
| - TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv, false) {} |
| + TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv, true) {} |
|
Ami GONE FROM CHROMIUM
2012/07/25 23:06:01
s/, true// instead?
nilesh
2012/07/26 00:54:02
Done.
|
| virtual ~TestSuiteNoAtExit() {} |
| + protected: |
| + virtual void Initialize(); |
| }; |
| -int main(int argc, char** argv) { |
| - // By default command-line parsing happens only in TestSuite::Run(), but |
|
nilesh
2012/07/25 21:56:32
I think this can be removed now.
TestSuite ctor ca
|
| - // that's too late to get VLOGs and so on from |
| - // InitializeMediaLibraryForTesting() below. Instead initialize logging |
| - // explicitly here (and have it get re-initialized by TestSuite::Run()). |
| - CommandLine::Init(argc, argv); |
| - CHECK(logging::InitLogging( |
| - NULL, |
| - logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
| - logging::DONT_LOCK_LOG_FILE, |
| - logging::APPEND_TO_OLD_LOG_FILE, |
| - logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS)); |
| - base::AtExitManager exit_manager; |
| - |
| +void TestSuiteNoAtExit::Initialize() { |
| + // Run TestSuite::Initialize first so that logging in initialized. |
|
Ami GONE FROM CHROMIUM
2012/07/25 23:06:01
s/in/is/
nilesh
2012/07/26 00:54:02
Done.
|
| + base::TestSuite::Initialize(); |
| media::InitializeMediaLibraryForTesting(); |
|
Ami GONE FROM CHROMIUM
2012/07/25 23:06:01
It's strange-looking that this will be called mult
nilesh
2012/07/26 00:54:02
Maybe I am missing something, but Initialize is ca
Ami GONE FROM CHROMIUM
2012/07/26 04:01:11
I was thinking of gtest's SetUp method, which is c
|
| +} |
| +int main(int argc, char** argv) { |
| return TestSuiteNoAtExit(argc, argv).Run(); |
| } |