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

Unified Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm

Issue 2813493004: Added audioSessionDidActivate and audioSessionDidDectivate (Closed)
Patch Set: remove code not for this cl Created 3 years, 8 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 | « webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm
diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm
index cb87910feed9add9ae0e8b2131b67715f91b15bf..3f55077ed213a1ac6aed75e6befb2def545d7c49 100644
--- a/webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm
@@ -176,6 +176,15 @@
EXPECT_EQ(0u, session.delegates.size());
}
+- (void)testAudioSessionActivation {
+ RTCAudioSession *audioSession = [RTCAudioSession sharedInstance];
+ EXPECT_EQ(0, audioSession.activationCount);
+ [audioSession audioSessionDidActivate:[AVAudioSession sharedInstance]];
+ EXPECT_EQ(1, audioSession.activationCount);
+ [audioSession audioSessionDidDeactivate:[AVAudioSession sharedInstance]];
+ EXPECT_EQ(0, audioSession.activationCount);
+}
+
@end
namespace webrtc {
@@ -215,4 +224,10 @@ TEST_F(AudioSessionTest, RemoveDelegateOnDealloc) {
[test testRemoveDelegateOnDealloc];
}
+TEST_F(AudioSessionTest, AudioSessionActivation) {
+ RTCAudioSessionTest *test = [[RTCAudioSessionTest alloc] init];
+ [test testAudioSessionActivation];
+}
+
+
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698