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

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

Issue 10808115: Run media_unittests on android test bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits, removed some unused header inclusion. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « build/android/run_tests.py ('k') | 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/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/logging.h"
8 #include "base/test/test_suite.h" 5 #include "base/test/test_suite.h"
9 #include "media/base/media.h" 6 #include "media/base/media.h"
10 7
11 class TestSuiteNoAtExit : public base::TestSuite { 8 class TestSuiteNoAtExit : public base::TestSuite {
12 public: 9 public:
13 TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv, false) {} 10 TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
14 virtual ~TestSuiteNoAtExit() {} 11 virtual ~TestSuiteNoAtExit() {}
12 protected:
13 virtual void Initialize();
15 }; 14 };
16 15
16 void TestSuiteNoAtExit::Initialize() {
17 // Run TestSuite::Initialize first so that logging is initialized.
18 base::TestSuite::Initialize();
19 // Run this here instead of main() to ensure an AtExitManager is already
20 // present.
21 media::InitializeMediaLibraryForTesting();
22 }
23
17 int main(int argc, char** argv) { 24 int main(int argc, char** argv) {
18 // By default command-line parsing happens only in TestSuite::Run(), but
19 // that's too late to get VLOGs and so on from
20 // InitializeMediaLibraryForTesting() below. Instead initialize logging
21 // explicitly here (and have it get re-initialized by TestSuite::Run()).
22 CommandLine::Init(argc, argv);
23 CHECK(logging::InitLogging(
24 NULL,
25 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
26 logging::DONT_LOCK_LOG_FILE,
27 logging::APPEND_TO_OLD_LOG_FILE,
28 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS));
29 base::AtExitManager exit_manager;
30
31 media::InitializeMediaLibraryForTesting();
32
33 return TestSuiteNoAtExit(argc, argv).Run(); 25 return TestSuiteNoAtExit(argc, argv).Run();
34 } 26 }
OLDNEW
« no previous file with comments | « build/android/run_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698