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

Side by Side Diff: webrtc/sdk/objc/Framework/UnitTests/RTCAudioSessionTest.mm

Issue 2813493004: Added audioSessionDidActivate and audioSessionDidDectivate (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/external/webrtc into activeCount 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 unified diff | Download patch
« no previous file with comments | « webrtc/sdk/objc/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #import <Foundation/Foundation.h>
12
13 #include <vector>
14
15 #include "webrtc/base/gunit.h"
16
17 #import "NSString+StdString.h"
18 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h"
19 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h"
20 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSessionConfiguration.h"
21
22 @interface RTCAudioSessionTest : NSObject
23 - (void)testAudioSessionActivation;
24 @end
25
26 @implementation RTCAudioSessionTest
27
tkchin_webrtc 2017/04/13 20:17:30 it'd be nice to have a unit test here that capture
28 - (void)testAudioSessionActivation {
29 RTCAudioSession *audioSession = [RTCAudioSession sharedInstance];
30 EXPECT_EQ(0, audioSession.activationCount);
31 [audioSession audioSessionDidActivate:[AVAudioSession sharedInstance]];
32 EXPECT_EQ(1, audioSession.activationCount);
33 [audioSession audioSessionDidDeactivate:[AVAudioSession sharedInstance]];
34 EXPECT_EQ(0, audioSession.activationCount);
35 }
36
37 @end
38
39 TEST(RTCAudioSessionTest, ConfigurationGetterTest) {
40 @autoreleasepool {
41 RTCAudioSessionTest *test = [[RTCAudioSessionTest alloc] init];
42 [test testAudioSessionActivation];
43 }
44 }
45
46
OLDNEW
« no previous file with comments | « webrtc/sdk/objc/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698