summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper_devices_unittest.cc
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 23:20:24 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 23:20:24 +0000
commit445623e613be115931b6b83dfa5f46d471fb0854 (patch)
treed79b08da87a87b915cb9638172b6357e729d7c19 /chrome/renderer/pepper_devices_unittest.cc
parent141c26dd8d4fea199546db1cb7b3c6644fff0e06 (diff)
downloadchromium_src-445623e613be115931b6b83dfa5f46d471fb0854.zip
chromium_src-445623e613be115931b6b83dfa5f46d471fb0854.tar.gz
chromium_src-445623e613be115931b6b83dfa5f46d471fb0854.tar.bz2
Revert 42656 - Add a Pepper audio basic functionality unit test.
Also changed TestSink to be derived from IPC::Channel and made MockRenderThread service AddFilter/RemoveFilter, so that it can be used by MessageFilters. Review URL: http://codereview.chromium.org/1207005 TBR=neb@chromium.org Review URL: http://codereview.chromium.org/1344003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/pepper_devices_unittest.cc')
-rw-r--r--chrome/renderer/pepper_devices_unittest.cc27
1 files changed, 0 insertions, 27 deletions
diff --git a/chrome/renderer/pepper_devices_unittest.cc b/chrome/renderer/pepper_devices_unittest.cc
index d7d2a6e..b793a4e 100644
--- a/chrome/renderer/pepper_devices_unittest.cc
+++ b/chrome/renderer/pepper_devices_unittest.cc
@@ -117,9 +117,6 @@ class PepperDeviceTest : public RenderViewTest {
NPError err,
NPUserData* user_data);
- // Audio callback, currently empty.
- static void AudioCallback(NPDeviceContextAudio* context);
-
// A log of flush commands we can use to check the async callbacks.
struct FlushData {
NPP instance;
@@ -221,10 +218,6 @@ void PepperDeviceTest::FlushCalled(NPP instance,
that->flush_calls_.push_back(flush_data);
}
-void PepperDeviceTest::AudioCallback(NPDeviceContextAudio* context) {
-}
-
-
// -----------------------------------------------------------------------------
// TODO(brettw) this crashes on Mac. Figure out why and enable.
@@ -257,23 +250,3 @@ TEST_F(PepperDeviceTest, Flush) {
EXPECT_EQ(1u, flush_calls_.size());
}
#endif
-
-TEST_F(PepperDeviceTest, AudioInit) {
- NPDeviceContextAudioConfig config;
- config.sampleRate = NPAudioSampleRate44100Hz;
- config.sampleType = NPAudioSampleTypeInt16;
- config.outputChannelMap = NPAudioChannelStereo;
- config.callback = &AudioCallback;
- config.userData = this;
- NPDeviceContextAudio context;
- EXPECT_EQ(NPERR_NO_ERROR,
- pepper_plugin()->DeviceAudioInitializeContext(&config, &context));
- EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching(
- ViewHostMsg_CreateAudioStream::ID));
- EXPECT_EQ(0, memcmp(&config, &context.config, sizeof(config)));
- EXPECT_EQ(NPERR_NO_ERROR,
- pepper_plugin()->DeviceAudioDestroyContext(&context));
- EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching(
- ViewHostMsg_CloseAudioStream::ID));
-}
-