iOS: baby steps to being able to include_tests=1
- pull iossim in DEPS even when on mac (because bug 2152) - fix audio_device_test_api.cc's use of bool instead of bool* (!) - move unused-on-mobile message to non-mobile-only section of hardware_before_streaming_test.cc BUG=3185 R=kjellander@webrtc.org, niklas.enbom@webrtc.org Review URL: https://webrtc-codereview.appspot.com/11989004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5914 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
7c6e3d188a
commit
ca539bbed0
6
DEPS
6
DEPS
@ -161,6 +161,12 @@ deps_os = {
|
|||||||
# NSS, for SSLClientSocketNSS.
|
# NSS, for SSLClientSocketNSS.
|
||||||
"third_party/nss":
|
"third_party/nss":
|
||||||
From("chromium_deps", "src/third_party/nss"),
|
From("chromium_deps", "src/third_party/nss"),
|
||||||
|
|
||||||
|
# TODO(kjellander): remove once bug 2152 is fixed.
|
||||||
|
# This needs to specify the path directly (instead of using the
|
||||||
|
# chromium_deps version) because chromium_deps only defines this for ios.
|
||||||
|
"testing/iossim/third_party/class-dump":
|
||||||
|
Var("chromium_trunk") + "/deps/third_party/class-dump@199203",
|
||||||
},
|
},
|
||||||
|
|
||||||
"ios": {
|
"ios": {
|
||||||
|
@ -1792,19 +1792,19 @@ TEST_F(AudioDeviceAPITest, SetPlayoutSpeaker) {
|
|||||||
#if defined(WEBRTC_IOS)
|
#if defined(WEBRTC_IOS)
|
||||||
// Not playing or recording, should just return a success
|
// Not playing or recording, should just return a success
|
||||||
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true));
|
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true));
|
||||||
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn));
|
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn));
|
||||||
EXPECT_TRUE(loudspeakerOn);
|
EXPECT_TRUE(loudspeakerOn);
|
||||||
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(false));
|
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(false));
|
||||||
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn));
|
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn));
|
||||||
EXPECT_FALSE(loudspeakerOn);
|
EXPECT_FALSE(loudspeakerOn);
|
||||||
|
|
||||||
EXPECT_EQ(0, audio_device_->InitPlayout());
|
EXPECT_EQ(0, audio_device_->InitPlayout());
|
||||||
EXPECT_EQ(0, audio_device_->StartPlayout());
|
EXPECT_EQ(0, audio_device_->StartPlayout());
|
||||||
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true));
|
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true));
|
||||||
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn));
|
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn));
|
||||||
EXPECT_TRUE(loudspeakerOn);
|
EXPECT_TRUE(loudspeakerOn);
|
||||||
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(false));
|
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(false));
|
||||||
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn));
|
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn));
|
||||||
EXPECT_FALSE(loudspeakerOn);
|
EXPECT_FALSE(loudspeakerOn);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -2688,7 +2688,7 @@ int32_t FuncTestManager::TestAdvancedMBAPI()
|
|||||||
" from the loudspeaker.\n\
|
" from the loudspeaker.\n\
|
||||||
> Press any key to stop...\n \n");
|
> Press any key to stop...\n \n");
|
||||||
PAUSE(DEFAULT_PAUSE_TIME);
|
PAUSE(DEFAULT_PAUSE_TIME);
|
||||||
EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(loudspeakerOn));
|
EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(&loudspeakerOn));
|
||||||
EXPECT_TRUE(loudspeakerOn);
|
EXPECT_TRUE(loudspeakerOn);
|
||||||
|
|
||||||
TEST_LOG("Set to not use speaker\n");
|
TEST_LOG("Set to not use speaker\n");
|
||||||
@ -2697,7 +2697,7 @@ int32_t FuncTestManager::TestAdvancedMBAPI()
|
|||||||
" from the loudspeaker.\n\
|
" from the loudspeaker.\n\
|
||||||
> Press any key to stop...\n \n");
|
> Press any key to stop...\n \n");
|
||||||
PAUSE(DEFAULT_PAUSE_TIME);
|
PAUSE(DEFAULT_PAUSE_TIME);
|
||||||
EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(loudspeakerOn));
|
EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(&loudspeakerOn));
|
||||||
EXPECT_FALSE(loudspeakerOn);
|
EXPECT_FALSE(loudspeakerOn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,10 +14,6 @@
|
|||||||
|
|
||||||
using namespace webrtc;
|
using namespace webrtc;
|
||||||
|
|
||||||
static const char* kNoDevicesErrorMessage =
|
|
||||||
"Either you have no recording / playout device "
|
|
||||||
"on your system, or the method failed.";
|
|
||||||
|
|
||||||
class HardwareBeforeStreamingTest : public AfterInitializationFixture {
|
class HardwareBeforeStreamingTest : public AfterInitializationFixture {
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -51,6 +47,10 @@ TEST_F(HardwareBeforeStreamingTest, ResetsAudioDeviceOnIphone) {
|
|||||||
// Tests that only apply to desktop:
|
// Tests that only apply to desktop:
|
||||||
#if !defined(WEBRTC_IOS) & !defined(WEBRTC_ANDROID)
|
#if !defined(WEBRTC_IOS) & !defined(WEBRTC_ANDROID)
|
||||||
|
|
||||||
|
static const char* kNoDevicesErrorMessage =
|
||||||
|
"Either you have no recording / playout device "
|
||||||
|
"on your system, or the method failed.";
|
||||||
|
|
||||||
TEST_F(HardwareBeforeStreamingTest, GetPlayoutDeviceStatusReturnsTrue) {
|
TEST_F(HardwareBeforeStreamingTest, GetPlayoutDeviceStatusReturnsTrue) {
|
||||||
bool play_available = false;
|
bool play_available = false;
|
||||||
EXPECT_EQ(0, voe_hardware_->GetPlayoutDeviceStatus(play_available));
|
EXPECT_EQ(0, voe_hardware_->GetPlayoutDeviceStatus(play_available));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user