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

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

Issue 2571473002: Fix cases where RunLoop is created without a MessageLoop. (Closed)
Patch Set: Fix chromeos tests. Created 4 years 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 | « content/browser/loader/async_revalidation_manager_browsertest.cc ('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 <stddef.h> 5 #include <stddef.h>
6 #include <memory> 6 #include <memory>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) { 117 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) {
118 SwitchCallbackCalled(result); 118 SwitchCallbackCalled(result);
119 loop->Quit(); 119 loop->Quit();
120 } 120 }
121 121
122 AudioRendererMixer* GetInputMixer() { return mixer_input_->mixer_; } 122 AudioRendererMixer* GetInputMixer() { return mixer_input_->mixer_; }
123 123
124 protected: 124 protected:
125 virtual ~AudioRendererMixerInputTest() {} 125 virtual ~AudioRendererMixerInputTest() {}
126 126
127 base::MessageLoop message_loop_;
127 AudioParameters audio_parameters_; 128 AudioParameters audio_parameters_;
128 scoped_refptr<MockAudioRendererSink> sinks_[2]; 129 scoped_refptr<MockAudioRendererSink> sinks_[2];
129 std::unique_ptr<AudioRendererMixer> mixers_[2]; 130 std::unique_ptr<AudioRendererMixer> mixers_[2];
130 scoped_refptr<AudioRendererMixerInput> mixer_input_; 131 scoped_refptr<AudioRendererMixerInput> mixer_input_;
131 std::unique_ptr<FakeAudioRenderCallback> fake_callback_; 132 std::unique_ptr<FakeAudioRenderCallback> fake_callback_;
132 std::unique_ptr<AudioBus> audio_bus_; 133 std::unique_ptr<AudioBus> audio_bus_;
133 134
134 private: 135 private:
135 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInputTest); 136 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInputTest);
136 }; 137 };
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, 397 base::Bind(&AudioRendererMixerInputTest::SwitchCallback,
397 base::Unretained(this), &run_loop)); 398 base::Unretained(this), &run_loop));
398 run_loop.Run(); 399 run_loop.Run();
399 400
400 mixer_input_->Initialize(audio_parameters_, fake_callback_.get()); 401 mixer_input_->Initialize(audio_parameters_, fake_callback_.get());
401 mixer_input_->Start(); 402 mixer_input_->Start();
402 mixer_input_->Stop(); 403 mixer_input_->Stop();
403 } 404 }
404 405
405 } // namespace media 406 } // namespace media
OLDNEW
« no previous file with comments | « content/browser/loader/async_revalidation_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698