Chromium Code Reviews| 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 "base/test/main_hook.h" | |
| 5 #include "base/test/test_suite.h" | 6 #include "base/test/test_suite.h" |
| 6 #include "media/base/media.h" | 7 #include "media/base/media.h" |
| 7 | 8 |
| 8 class TestSuiteNoAtExit : public base::TestSuite { | 9 class TestSuiteNoAtExit : public base::TestSuite { |
| 9 public: | 10 public: |
| 10 TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {} | 11 TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {} |
| 11 virtual ~TestSuiteNoAtExit() {} | 12 virtual ~TestSuiteNoAtExit() {} |
| 12 protected: | 13 protected: |
| 13 virtual void Initialize(); | 14 virtual void Initialize(); |
| 14 }; | 15 }; |
| 15 | 16 |
| 16 void TestSuiteNoAtExit::Initialize() { | 17 void TestSuiteNoAtExit::Initialize() { |
| 17 // Run TestSuite::Initialize first so that logging is initialized. | 18 // Run TestSuite::Initialize first so that logging is initialized. |
| 18 base::TestSuite::Initialize(); | 19 base::TestSuite::Initialize(); |
| 20 | |
|
stuartmorgan
2012/09/04 14:24:30
No need to add this blank line in an unrelated fun
Milan Broum
2012/09/04 14:38:21
Done.
| |
| 19 // Run this here instead of main() to ensure an AtExitManager is already | 21 // Run this here instead of main() to ensure an AtExitManager is already |
| 20 // present. | 22 // present. |
| 21 media::InitializeMediaLibraryForTesting(); | 23 media::InitializeMediaLibraryForTesting(); |
| 22 } | 24 } |
| 23 | 25 |
| 24 int main(int argc, char** argv) { | 26 int main(int argc, char** argv) { |
| 27 MainHook hook(main, argc, argv); | |
| 25 return TestSuiteNoAtExit(argc, argv).Run(); | 28 return TestSuiteNoAtExit(argc, argv).Run(); |
| 26 } | 29 } |
| OLD | NEW |