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

Unified Diff: media/blink/webaudiosourceprovider_impl_unittest.cc

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/webaudiosourceprovider_impl.cc ('k') | media/blink/webinbandtexttrack_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webaudiosourceprovider_impl_unittest.cc
diff --git a/content/renderer/media/webaudiosourceprovider_impl_unittest.cc b/media/blink/webaudiosourceprovider_impl_unittest.cc
similarity index 92%
rename from content/renderer/media/webaudiosourceprovider_impl_unittest.cc
rename to media/blink/webaudiosourceprovider_impl_unittest.cc
index 8a59822debc05e5b7c1b5132fd13a1c5efd037a6..c1725fa5d06aa65c8de01d49743b24d8f2e45e8d 100644
--- a/content/renderer/media/webaudiosourceprovider_impl_unittest.cc
+++ b/media/blink/webaudiosourceprovider_impl_unittest.cc
@@ -4,15 +4,15 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
-#include "content/renderer/media/webaudiosourceprovider_impl.h"
#include "media/audio/audio_parameters.h"
#include "media/base/fake_audio_render_callback.h"
#include "media/base/mock_audio_renderer_sink.h"
+#include "media/blink/webaudiosourceprovider_impl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebAudioSourceProviderClient.h"
-namespace content {
+namespace media {
namespace {
const float kTestVolume = 0.25;
@@ -23,10 +23,10 @@ class WebAudioSourceProviderImplTest
public blink::WebAudioSourceProviderClient {
public:
WebAudioSourceProviderImplTest()
- : params_(media::AudioParameters::AUDIO_PCM_LINEAR,
- media::CHANNEL_LAYOUT_STEREO, 48000, 16, 64),
+ : params_(AudioParameters::AUDIO_PCM_LINEAR,
+ CHANNEL_LAYOUT_STEREO, 48000, 16, 64),
fake_callback_(0.1),
- mock_sink_(new media::MockAudioRendererSink()),
+ mock_sink_(new MockAudioRendererSink()),
wasp_impl_(new WebAudioSourceProviderImpl(mock_sink_)) {
}
@@ -67,7 +67,7 @@ class WebAudioSourceProviderImplTest
testing::Mock::VerifyAndClear(this);
}
- bool CompareBusses(const media::AudioBus* bus1, const media::AudioBus* bus2) {
+ bool CompareBusses(const AudioBus* bus1, const AudioBus* bus2) {
EXPECT_EQ(bus1->channels(), bus2->channels());
EXPECT_EQ(bus1->frames(), bus2->frames());
for (int ch = 0; ch < bus1->channels(); ++ch) {
@@ -83,9 +83,9 @@ class WebAudioSourceProviderImplTest
MOCK_METHOD2(setFormat, void(size_t numberOfChannels, float sampleRate));
protected:
- media::AudioParameters params_;
- media::FakeAudioRenderCallback fake_callback_;
- scoped_refptr<media::MockAudioRendererSink> mock_sink_;
+ AudioParameters params_;
+ FakeAudioRenderCallback fake_callback_;
+ scoped_refptr<MockAudioRendererSink> mock_sink_;
scoped_refptr<WebAudioSourceProviderImpl> wasp_impl_;
base::MessageLoop message_loop_;
@@ -156,8 +156,8 @@ TEST_F(WebAudioSourceProviderImplTest, SinkStateRestored) {
// Test the AudioRendererSink state machine and its effects on provideInput().
TEST_F(WebAudioSourceProviderImplTest, ProvideInput) {
- scoped_ptr<media::AudioBus> bus1 = media::AudioBus::Create(params_);
- scoped_ptr<media::AudioBus> bus2 = media::AudioBus::Create(params_);
+ scoped_ptr<AudioBus> bus1 = AudioBus::Create(params_);
+ scoped_ptr<AudioBus> bus2 = AudioBus::Create(params_);
// Point the WebVector into memory owned by |bus1|.
blink::WebVector<float*> audio_data(static_cast<size_t>(bus1->channels()));
@@ -237,4 +237,4 @@ TEST_F(WebAudioSourceProviderImplTest, ProvideInput) {
ASSERT_TRUE(CompareBusses(bus1.get(), bus2.get()));
}
-} // namespace content
+} // namespace media
« no previous file with comments | « media/blink/webaudiosourceprovider_impl.cc ('k') | media/blink/webinbandtexttrack_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698