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

Side by Side Diff: talk/app/webrtc/objctests/RTCPeerConnectionSyncObserver.m

Issue 1207613006: Support for onbufferedamountlow (Closed) Base URL: https://chromium.googlesource.com/external/webrtc/trunk/talk.git@master
Patch Set: Objective C style cleanup Created 5 years, 5 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
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 #pragma mark - RTCDataChannelDelegate 224 #pragma mark - RTCDataChannelDelegate
225 225
226 - (void)channelDidChangeState:(RTCDataChannel*)channel { 226 - (void)channelDidChangeState:(RTCDataChannel*)channel {
227 NSAssert([_expectedStateChanges count] > 0, 227 NSAssert([_expectedStateChanges count] > 0,
228 @"Unexpected state change"); 228 @"Unexpected state change");
229 int expectedState = [self popFirstElementAsInt:_expectedStateChanges]; 229 int expectedState = [self popFirstElementAsInt:_expectedStateChanges];
230 NSAssert(expectedState == channel.state, @"Channel state should match"); 230 NSAssert(expectedState == channel.state, @"Channel state should match");
231 } 231 }
232 232
233 - (void)channel:(RTCDataChannel*)channel 233 - (void)channel:(RTCDataChannel*)channel
234 didChangeBufferedAmount:(NSUInteger)previousAmount {
235 NSAssert(channel.bufferedAmount != previousAmount,
236 @"Invalid bufferedAmount change");
237 }
238
239 - (void)channel:(RTCDataChannel*)channel
234 didReceiveMessageWithBuffer:(RTCDataBuffer*)buffer { 240 didReceiveMessageWithBuffer:(RTCDataBuffer*)buffer {
235 NSAssert([_expectedMessages count] > 0, 241 NSAssert([_expectedMessages count] > 0,
236 @"Unexpected message received"); 242 @"Unexpected message received");
237 RTCDataBuffer* expectedBuffer = [_expectedMessages objectAtIndex:0]; 243 RTCDataBuffer* expectedBuffer = [_expectedMessages objectAtIndex:0];
238 NSAssert(expectedBuffer.isBinary == buffer.isBinary, 244 NSAssert(expectedBuffer.isBinary == buffer.isBinary,
239 @"Buffer isBinary should match"); 245 @"Buffer isBinary should match");
240 NSAssert([expectedBuffer.data isEqual:buffer.data], 246 NSAssert([expectedBuffer.data isEqual:buffer.data],
241 @"Buffer data should match"); 247 @"Buffer data should match");
242 [_expectedMessages removeObjectAtIndex:0]; 248 [_expectedMessages removeObjectAtIndex:0];
243 } 249 }
244 250
245 @end 251 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698