| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/webaudiosourceprovider_impl.h" | 5 #include "content/renderer/media/webaudiosourceprovider_impl.h" |
| 6 #include "media/audio/audio_parameters.h" | 6 #include "media/audio/audio_parameters.h" |
| 7 #include "media/base/fake_audio_render_callback.h" | 7 #include "media/base/fake_audio_render_callback.h" |
| 8 #include "media/base/mock_audio_renderer_sink.h" | 8 #include "media/base/mock_audio_renderer_sink.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/WebKit/public/web/WebAudioSourceProviderClient.h" | 11 #include "third_party/WebKit/public/platform/WebAudioSourceProviderClient.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 const float kTestVolume = 0.25; | 16 const float kTestVolume = 0.25; |
| 17 } // namespace | 17 } // namespace |
| 18 | 18 |
| 19 class WebAudioSourceProviderImplTest | 19 class WebAudioSourceProviderImplTest |
| 20 : public testing::Test, | 20 : public testing::Test, |
| 21 public blink::WebAudioSourceProviderClient { | 21 public blink::WebAudioSourceProviderClient { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 ASSERT_FALSE(CompareBusses(bus1.get(), bus2.get())); | 212 ASSERT_FALSE(CompareBusses(bus1.get(), bus2.get())); |
| 213 | 213 |
| 214 // Stop() should return silence. | 214 // Stop() should return silence. |
| 215 wasp_impl_->Stop(); | 215 wasp_impl_->Stop(); |
| 216 bus1->channel(0)[0] = 1; | 216 bus1->channel(0)[0] = 1; |
| 217 wasp_impl_->provideInput(audio_data, params_.frames_per_buffer()); | 217 wasp_impl_->provideInput(audio_data, params_.frames_per_buffer()); |
| 218 ASSERT_TRUE(CompareBusses(bus1.get(), bus2.get())); | 218 ASSERT_TRUE(CompareBusses(bus1.get(), bus2.get())); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace content | 221 } // namespace content |
| OLD | NEW |