summaryrefslogtreecommitdiff
path: root/chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-26 13:57:00 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-11-02 11:31:01 +0000
commit1943b3c2a1dcee36c233724fc4ee7613d71b9cf6 (patch)
tree8c1b5f12357025c197da5427ae02cfdc2f3570d6 /chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc
parent21ba0c5d4bf8fba15dddd97cd693bad2358b77fd (diff)
downloadqtwebengine-chromium-1943b3c2a1dcee36c233724fc4ee7613d71b9cf6.tar.gz
BASELINE: Update Chromium to 94.0.4606.111
Change-Id: I924781584def20fc800bedf6ff41fdb96c438193 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc')
-rw-r--r--chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc b/chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc
index 73a7abc2864..53e5b3c14c2 100644
--- a/chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc
+++ b/chromium/net/third_party/quiche/src/quic/qbone/bonnet/tun_device_controller_test.cc
@@ -44,8 +44,10 @@ class TunDeviceControllerTest : public QuicTest {
public:
TunDeviceControllerTest()
: controller_(kIfname, true, &netlink_),
- link_local_range_(
- *QboneConstants::TerminatorLocalAddressRange()) {}
+ link_local_range_(*QboneConstants::TerminatorLocalAddressRange()) {
+ controller_.RegisterAddressUpdateCallback(
+ [this](QuicIpAddress address) { notified_address_ = address; });
+ }
protected:
void ExpectLinkInfo(const std::string& interface_name, int ifindex) {
@@ -60,6 +62,7 @@ class TunDeviceControllerTest : public QuicTest {
MockNetlink netlink_;
TunDeviceController controller_;
+ QuicIpAddress notified_address_;
IpRange link_local_range_;
};
@@ -77,6 +80,7 @@ TEST_F(TunDeviceControllerTest, AddressAppliedWhenNoneExisted) {
.WillOnce(Return(true));
EXPECT_TRUE(controller_.UpdateAddress(kIpRange));
+ EXPECT_THAT(notified_address_, Eq(kIpRange.FirstAddressInRange()));
}
TEST_F(TunDeviceControllerTest, OldAddressesAreRemoved) {
@@ -110,6 +114,7 @@ TEST_F(TunDeviceControllerTest, OldAddressesAreRemoved) {
.WillOnce(Return(true));
EXPECT_TRUE(controller_.UpdateAddress(kIpRange));
+ EXPECT_THAT(notified_address_, Eq(kIpRange.FirstAddressInRange()));
}
TEST_F(TunDeviceControllerTest, UpdateRoutesRemovedOldRoutes) {