| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "webrtc/test/gmock.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "webrtc/test/gtest.h" |
| 17 #include "webrtc/call/bitrate_allocator.h" | 17 #include "webrtc/call/bitrate_allocator.h" |
| 18 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 18 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| 19 | 19 |
| 20 using testing::NiceMock; | 20 using testing::NiceMock; |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 | 23 |
| 24 class MockLimitObserver : public BitrateAllocator::LimitObserver { | 24 class MockLimitObserver : public BitrateAllocator::LimitObserver { |
| 25 public: | 25 public: |
| 26 MOCK_METHOD2(OnAllocationLimitsChanged, | 26 MOCK_METHOD2(OnAllocationLimitsChanged, |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 allocator_->OnNetworkChanged(330000, 0, 50); | 492 allocator_->OnNetworkChanged(330000, 0, 50); |
| 493 EXPECT_EQ(330000u, observer.last_bitrate_bps_); | 493 EXPECT_EQ(330000u, observer.last_bitrate_bps_); |
| 494 | 494 |
| 495 allocator_->OnNetworkChanged(300000, 0, 50); | 495 allocator_->OnNetworkChanged(300000, 0, 50); |
| 496 EXPECT_EQ(300000u, observer.last_bitrate_bps_); | 496 EXPECT_EQ(300000u, observer.last_bitrate_bps_); |
| 497 | 497 |
| 498 allocator_->RemoveObserver(&observer); | 498 allocator_->RemoveObserver(&observer); |
| 499 } | 499 } |
| 500 | 500 |
| 501 } // namespace webrtc | 501 } // namespace webrtc |
| OLD | NEW |