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

Side by Side Diff: media/cast/test/utility/standalone_cast_environment.cc

Issue 436673004: Fix flaky cast_unittests where threads were being joined incorrectly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « media/cast/test/utility/standalone_cast_environment.h ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/cast/test/utility/standalone_cast_environment.h" 5 #include "media/cast/test/utility/standalone_cast_environment.h"
6 6
7 #include "base/time/default_tick_clock.h" 7 #include "base/time/default_tick_clock.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
(...skipping 12 matching lines...) Expand all
23 CastEnvironment::name##_thread_proxy_ = name##_thread_.message_loop_proxy() 23 CastEnvironment::name##_thread_proxy_ = name##_thread_.message_loop_proxy()
24 24
25 CREATE_TASK_RUNNER(main, 25 CREATE_TASK_RUNNER(main,
26 base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); 26 base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
27 CREATE_TASK_RUNNER(audio, base::Thread::Options()); 27 CREATE_TASK_RUNNER(audio, base::Thread::Options());
28 CREATE_TASK_RUNNER(video, base::Thread::Options()); 28 CREATE_TASK_RUNNER(video, base::Thread::Options());
29 #undef CREATE_TASK_RUNNER 29 #undef CREATE_TASK_RUNNER
30 } 30 }
31 31
32 StandaloneCastEnvironment::~StandaloneCastEnvironment() { 32 StandaloneCastEnvironment::~StandaloneCastEnvironment() {
33 DCHECK(CalledOnValidThread()); 33 CHECK(CalledOnValidThread());
34 CHECK(!main_thread_.IsRunning());
35 CHECK(!audio_thread_.IsRunning());
36 CHECK(!video_thread_.IsRunning());
34 } 37 }
35 38
36 void StandaloneCastEnvironment::Shutdown() { 39 void StandaloneCastEnvironment::Shutdown() {
37 DCHECK(CalledOnValidThread()); 40 CHECK(CalledOnValidThread());
38 main_thread_.Stop(); 41 main_thread_.Stop();
39 audio_thread_.Stop(); 42 audio_thread_.Stop();
40 video_thread_.Stop(); 43 video_thread_.Stop();
41 } 44 }
42 45
43 } // namespace cast 46 } // namespace cast
44 } // namespace media 47 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/utility/standalone_cast_environment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698