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

Side by Side Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm

Issue 1782363002: Fix lock behavior on RTCAudioSession. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove autoreleasepool bits Created 4 years, 9 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 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 "testing/gtest/include/gtest/gtest.h"
14
15 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h"
16
17 @interface RTCAudioSessionTest : NSObject
18
19 - (void)testLockForConfiguration;
20
21 @end
22
23 @implementation RTCAudioSessionTest
24
25 - (void)testLockForConfiguration {
26 RTCAudioSession *session = [RTCAudioSession sharedInstance];
27
28 for (size_t i = 0; i < 2; i++) {
29 [session lockForConfiguration];
30 EXPECT_TRUE(session.isLocked);
31 }
32 for (size_t i = 0; i < 2; i++) {
33 EXPECT_TRUE(session.isLocked);
34 [session unlockForConfiguration];
35 }
36 EXPECT_FALSE(session.isLocked);
37 }
38
39 @end
40
41 TEST(RTCAudioSessionTest, LockForConfiguration) {
42 RTCAudioSessionTest *test = [[RTCAudioSessionTest alloc] init];
43 [test testLockForConfiguration];
44 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h ('k') | webrtc/modules/modules.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698