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

Unified Diff: ppapi/tests/test_audio_config.cc

Issue 10534152: Add RecommendSampleRate to audio config test. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « ppapi/tests/test_audio_config.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_audio_config.cc
===================================================================
--- ppapi/tests/test_audio_config.cc (revision 142747)
+++ ppapi/tests/test_audio_config.cc (working copy)
@@ -19,10 +19,22 @@
}
void TestAudioConfig::RunTests(const std::string& filter) {
+ RUN_TEST(RecommendSampleRate, filter);
RUN_TEST(ValidConfigs, filter);
RUN_TEST(InvalidConfigs, filter);
}
+std::string TestAudioConfig::TestRecommendSampleRate() {
+ // Ask PPB_AudioConfig about the recommended sample rate.
+ PP_AudioSampleRate sample_rate = audio_config_interface_->RecommendSampleRate(
+ instance_->pp_instance());
+ ASSERT_TRUE(sample_rate == PP_AUDIOSAMPLERATE_NONE ||
+ sample_rate == PP_AUDIOSAMPLERATE_44100 ||
+ sample_rate == PP_AUDIOSAMPLERATE_48000);
+
+ PASS();
+}
+
std::string TestAudioConfig::TestValidConfigs() {
static const PP_AudioSampleRate kSampleRates[] = {
PP_AUDIOSAMPLERATE_44100,
« no previous file with comments | « ppapi/tests/test_audio_config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698