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

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

Issue 2710133003: Replace FFmpegDemuxer thread per element with base::TaskScheduler. (Closed)
Patch Set: Use base::TaskScheduler. Created 3 years, 9 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
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/task_scheduler/task_scheduler.h"
7 #include "base/test/launcher/unit_test_launcher.h" 8 #include "base/test/launcher/unit_test_launcher.h"
8 #include "base/test/test_discardable_memory_allocator.h" 9 #include "base/test/test_discardable_memory_allocator.h"
9 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 #include "media/base/fake_localized_strings.h" 12 #include "media/base/fake_localized_strings.h"
12 #include "media/base/media.h" 13 #include "media/base/media.h"
13 #include "media/base/media_switches.h" 14 #include "media/base/media_switches.h"
14 #include "mojo/edk/embedder/embedder.h" 15 #include "mojo/edk/embedder/embedder.h"
15 16
16 #if defined(OS_ANDROID) 17 #if defined(OS_ANDROID)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 50
50 if (media::MediaCodecUtil::IsMediaCodecAvailable()) 51 if (media::MediaCodecUtil::IsMediaCodecAvailable())
51 media::EnablePlatformDecoderSupport(); 52 media::EnablePlatformDecoderSupport();
52 #endif 53 #endif
53 54
54 // Run this here instead of main() to ensure an AtExitManager is already 55 // Run this here instead of main() to ensure an AtExitManager is already
55 // present. 56 // present.
56 media::InitializeMediaLibrary(); 57 media::InitializeMediaLibrary();
57 media::SetUpFakeLocalizedStrings(); 58 media::SetUpFakeLocalizedStrings();
58 59
60 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(1);
gab 2017/02/23 21:37:10 base::test::ScopedTaskScheduler (we typically pref
59 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); 61 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
60 } 62 }
61 63
62 int main(int argc, char** argv) { 64 int main(int argc, char** argv) {
63 mojo::edk::Init(); 65 mojo::edk::Init();
64 TestSuiteNoAtExit test_suite(argc, argv); 66 TestSuiteNoAtExit test_suite(argc, argv);
65 67
66 return base::LaunchUnitTests( 68 return base::LaunchUnitTests(
67 argc, argv, 69 argc, argv,
68 base::Bind(&TestSuiteNoAtExit::Run, base::Unretained(&test_suite))); 70 base::Bind(&TestSuiteNoAtExit::Run, base::Unretained(&test_suite)));
69 } 71 }
OLDNEW
« media/filters/ffmpeg_demuxer.cc ('K') | « media/filters/ffmpeg_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698