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

Side by Side Diff: webrtc/api/objctests/RTCMediaConstraintsTest.mm

Issue 1726213002: Compile rtc_api_objc on Mac. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update TODO format Created 4 years, 10 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/api/objc/WebRTC-Prefix.pch ('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
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 29 matching lines...) Expand all
40 nativeConstraints->GetOptional(); 40 nativeConstraints->GetOptional();
41 [self expectConstraints:optional inNativeConstraints:nativeOptional]; 41 [self expectConstraints:optional inNativeConstraints:nativeOptional];
42 } 42 }
43 43
44 - (void)expectConstraints:(NSDictionary *)constraints 44 - (void)expectConstraints:(NSDictionary *)constraints
45 inNativeConstraints: 45 inNativeConstraints:
46 (webrtc::MediaConstraintsInterface::Constraints)nativeConstraints { 46 (webrtc::MediaConstraintsInterface::Constraints)nativeConstraints {
47 EXPECT_EQ(constraints.count, nativeConstraints.size()); 47 EXPECT_EQ(constraints.count, nativeConstraints.size());
48 48
49 for (NSString *key in constraints) { 49 for (NSString *key in constraints) {
50 NSString *value = constraints[key]; 50 NSString *value = [constraints objectForKey:key];
51 51
52 std::string nativeValue; 52 std::string nativeValue;
53 bool found = nativeConstraints.FindFirst(key.stdString, &nativeValue); 53 bool found = nativeConstraints.FindFirst(key.stdString, &nativeValue);
54 EXPECT_TRUE(found); 54 EXPECT_TRUE(found);
55 EXPECT_EQ(value.stdString, nativeValue); 55 EXPECT_EQ(value.stdString, nativeValue);
56 } 56 }
57 } 57 }
58 58
59 @end 59 @end
60 60
61 TEST(RTCMediaConstraintsTest, MediaConstraintsTest) { 61 TEST(RTCMediaConstraintsTest, MediaConstraintsTest) {
62 @autoreleasepool { 62 @autoreleasepool {
63 RTCMediaConstraintsTest *test = [[RTCMediaConstraintsTest alloc] init]; 63 RTCMediaConstraintsTest *test = [[RTCMediaConstraintsTest alloc] init];
64 [test testMediaConstraints]; 64 [test testMediaConstraints];
65 } 65 }
66 } 66 }
OLDNEW
« no previous file with comments | « webrtc/api/objc/WebRTC-Prefix.pch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698