OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } else { | 99 } else { |
100 streams.push_front(stream); | 100 streams.push_front(stream); |
101 } | 101 } |
102 } | 102 } |
103 for (auto s : streams) { | 103 for (auto s : streams) { |
104 call->DestroyAudioReceiveStream(s); | 104 call->DestroyAudioReceiveStream(s); |
105 } | 105 } |
106 streams.clear(); | 106 streams.clear(); |
107 } | 107 } |
108 } | 108 } |
| 109 |
| 110 TEST(CallTest, AggregateNetworkState_DownOnlyIfAllChannelsAreDown) { |
| 111 EXPECT_EQ(kNetworkUp, AggregateNetworkState( |
| 112 ChannelNetworkState::CHANNEL_NOT_PRESENT, |
| 113 ChannelNetworkState::CHANNEL_NOT_PRESENT)); |
| 114 EXPECT_EQ(kNetworkUp, AggregateNetworkState( |
| 115 ChannelNetworkState::CHANNEL_NETWORK_UP, |
| 116 ChannelNetworkState::CHANNEL_NOT_PRESENT)); |
| 117 EXPECT_EQ(kNetworkUp, AggregateNetworkState( |
| 118 ChannelNetworkState::CHANNEL_NOT_PRESENT, |
| 119 ChannelNetworkState::CHANNEL_NETWORK_UP)); |
| 120 EXPECT_EQ(kNetworkUp, AggregateNetworkState( |
| 121 ChannelNetworkState::CHANNEL_NETWORK_UP, |
| 122 ChannelNetworkState::CHANNEL_NETWORK_UP)); |
| 123 EXPECT_EQ(kNetworkUp, AggregateNetworkState( |
| 124 ChannelNetworkState::CHANNEL_NETWORK_DOWN, |
| 125 ChannelNetworkState::CHANNEL_NETWORK_UP)); |
| 126 EXPECT_EQ(kNetworkUp, AggregateNetworkState( |
| 127 ChannelNetworkState::CHANNEL_NETWORK_UP, |
| 128 ChannelNetworkState::CHANNEL_NETWORK_DOWN)); |
| 129 |
| 130 EXPECT_EQ(kNetworkDown, AggregateNetworkState( |
| 131 ChannelNetworkState::CHANNEL_NETWORK_DOWN, |
| 132 ChannelNetworkState::CHANNEL_NOT_PRESENT)); |
| 133 EXPECT_EQ(kNetworkDown, AggregateNetworkState( |
| 134 ChannelNetworkState::CHANNEL_NOT_PRESENT, |
| 135 ChannelNetworkState::CHANNEL_NETWORK_DOWN)); |
| 136 EXPECT_EQ(kNetworkDown, AggregateNetworkState( |
| 137 ChannelNetworkState::CHANNEL_NETWORK_DOWN, |
| 138 ChannelNetworkState::CHANNEL_NETWORK_DOWN)); |
| 139 } |
| 140 |
109 } // namespace webrtc | 141 } // namespace webrtc |
OLD | NEW |