Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: media/base/run_all_unittests.cc

Issue 10915061: Add MainHook to media unittests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698