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

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

Issue 2426773005: media: Reorganize media unittests (Closed)
Patch Set: fix android Created 4 years, 2 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 | « media/test/BUILD.gn ('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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/test/launcher/unit_test_launcher.h" 7 #include "base/test/launcher/unit_test_launcher.h"
8 #include "base/test/test_discardable_memory_allocator.h" 8 #include "base/test/test_discardable_memory_allocator.h"
9 #include "base/test/test_suite.h" 9 #include "base/test/test_suite.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 25 matching lines...) Expand all
36 base::TestSuite::Initialize(); 36 base::TestSuite::Initialize();
37 37
38 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 38 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
39 command_line->AppendSwitch(switches::kEnableInbandTextTracks); 39 command_line->AppendSwitch(switches::kEnableInbandTextTracks);
40 40
41 #if defined(OS_ANDROID) 41 #if defined(OS_ANDROID)
42 // Register JNI bindings for android. 42 // Register JNI bindings for android.
43 JNIEnv* env = base::android::AttachCurrentThread(); 43 JNIEnv* env = base::android::AttachCurrentThread();
44 // Needed for surface texture support. 44 // Needed for surface texture support.
45 ui::gl::android::RegisterJni(env); 45 ui::gl::android::RegisterJni(env);
46
46 media::RegisterJni(env); 47 media::RegisterJni(env);
47 48
48 if (media::MediaCodecUtil::IsMediaCodecAvailable()) 49 if (media::MediaCodecUtil::IsMediaCodecAvailable())
49 media::EnablePlatformDecoderSupport(); 50 media::EnablePlatformDecoderSupport();
50 #endif 51 #endif
51 52
52 // Run this here instead of main() to ensure an AtExitManager is already 53 // Run this here instead of main() to ensure an AtExitManager is already
53 // present. 54 // present.
54 media::InitializeMediaLibrary(); 55 media::InitializeMediaLibrary();
55 media::SetUpFakeMediaResources(); 56 media::SetUpFakeMediaResources();
56 57
57 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); 58 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
58 } 59 }
59 60
60 int main(int argc, char** argv) { 61 int main(int argc, char** argv) {
61 TestSuiteNoAtExit test_suite(argc, argv); 62 TestSuiteNoAtExit test_suite(argc, argv);
62 63
63 return base::LaunchUnitTests( 64 return base::LaunchUnitTests(
64 argc, argv, base::Bind(&TestSuiteNoAtExit::Run, 65 argc, argv,
65 base::Unretained(&test_suite))); 66 base::Bind(&TestSuiteNoAtExit::Run, base::Unretained(&test_suite)));
66 } 67 }
OLDNEW
« no previous file with comments | « media/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698