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

Unified Diff: net/base/address_tracker_linux_unittest.cc

Issue 642403002: git cl format the first third of the net/base directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/cache_type.h » ('j') | net/base/data_url_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/address_tracker_linux_unittest.cc
diff --git a/net/base/address_tracker_linux_unittest.cc b/net/base/address_tracker_linux_unittest.cc
index 641220731b71bbbe43b54f4e8b564921494f5b64..1f6cb24092b9470b23f88f57a66d19dd91b7c8c5 100644
--- a/net/base/address_tracker_linux_unittest.cc
+++ b/net/base/address_tracker_linux_unittest.cc
@@ -53,8 +53,8 @@ class AddressTrackerLinuxTest : public testing::Test {
bool address_changed = false;
bool link_changed = false;
bool tunnel_changed = false;
- tracker_->HandleMessage(&writable_buf[0], buf.size(),
- &address_changed, &link_changed, &tunnel_changed);
+ tracker_->HandleMessage(&writable_buf[0], buf.size(), &address_changed,
+ &link_changed, &tunnel_changed);
EXPECT_FALSE(link_changed);
return address_changed;
}
@@ -64,8 +64,8 @@ class AddressTrackerLinuxTest : public testing::Test {
bool address_changed = false;
bool link_changed = false;
bool tunnel_changed = false;
- tracker_->HandleMessage(&writable_buf[0], buf.size(),
- &address_changed, &link_changed, &tunnel_changed);
+ tracker_->HandleMessage(&writable_buf[0], buf.size(), &address_changed,
+ &link_changed, &tunnel_changed);
EXPECT_FALSE(address_changed);
return link_changed;
}
@@ -75,8 +75,8 @@ class AddressTrackerLinuxTest : public testing::Test {
bool address_changed = false;
bool link_changed = false;
bool tunnel_changed = false;
- tracker_->HandleMessage(&writable_buf[0], buf.size(),
- &address_changed, &link_changed, &tunnel_changed);
+ tracker_->HandleMessage(&writable_buf[0], buf.size(), &address_changed,
+ &link_changed, &tunnel_changed);
EXPECT_FALSE(address_changed);
return tunnel_changed;
}
@@ -103,8 +103,8 @@ class NetlinkMessage {
}
void AddPayload(const void* data, size_t length) {
- CHECK_EQ(static_cast<size_t>(NLMSG_HDRLEN),
- buffer_.size()) << "Payload must be added first";
+ CHECK_EQ(static_cast<size_t>(NLMSG_HDRLEN), buffer_.size())
+ << "Payload must be added first";
Append(data, length);
Align();
}
@@ -190,11 +190,11 @@ void MakeLinkMessage(uint16 type, uint32 flags, uint32 index, Buffer* output) {
nlmsg.AppendTo(output);
}
-const unsigned char kAddress0[] = { 127, 0, 0, 1 };
-const unsigned char kAddress1[] = { 10, 0, 0, 1 };
-const unsigned char kAddress2[] = { 192, 168, 0, 1 };
-const unsigned char kAddress3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1 };
+const unsigned char kAddress0[] = {127, 0, 0, 1};
+const unsigned char kAddress1[] = {10, 0, 0, 1};
+const unsigned char kAddress2[] = {192, 168, 0, 1};
+const unsigned char kAddress3[] =
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
TEST_F(AddressTrackerLinuxTest, NewAddress) {
InitializeAddressTracker(true);
@@ -406,8 +406,8 @@ TEST_F(AddressTrackerLinuxTest, AddInterface) {
// Ignores loopback.
MakeLinkMessage(RTM_NEWLINK,
- IFF_LOOPBACK | IFF_UP | IFF_LOWER_UP | IFF_RUNNING,
- 0, &buffer);
+ IFF_LOOPBACK | IFF_UP | IFF_LOWER_UP | IFF_RUNNING, 0,
+ &buffer);
EXPECT_FALSE(HandleLinkMessage(buffer));
EXPECT_TRUE(GetOnlineLinks().empty());
@@ -480,8 +480,8 @@ TEST_F(AddressTrackerLinuxTest, TunnelInterface) {
// Ignores without "tun" prefixed name.
MakeLinkMessage(RTM_NEWLINK,
- IFF_UP | IFF_LOWER_UP | IFF_RUNNING | IFF_POINTOPOINT,
- 0, &buffer);
+ IFF_UP | IFF_LOWER_UP | IFF_RUNNING | IFF_POINTOPOINT, 0,
+ &buffer);
EXPECT_FALSE(HandleTunnelMessage(buffer));
// Verify success.
@@ -498,8 +498,8 @@ TEST_F(AddressTrackerLinuxTest, TunnelInterface) {
// Ignores deleting without "tun" prefixed name.
MakeLinkMessage(RTM_DELLINK,
- IFF_UP | IFF_LOWER_UP | IFF_RUNNING | IFF_POINTOPOINT,
- 0, &buffer);
+ IFF_UP | IFF_LOWER_UP | IFF_RUNNING | IFF_POINTOPOINT, 0,
+ &buffer);
EXPECT_FALSE(HandleTunnelMessage(buffer));
// Verify successful deletion
@@ -531,8 +531,8 @@ TEST_F(AddressTrackerLinuxTest, NonTrackingMode) {
const IPAddressNumber kAddr0(kAddress0, kAddress0 + arraysize(kAddress0));
Buffer buffer;
- MakeAddrMessage(
- RTM_NEWADDR, IFA_F_TEMPORARY, AF_INET, kAddr0, kEmpty, &buffer);
+ MakeAddrMessage(RTM_NEWADDR, IFA_F_TEMPORARY, AF_INET, kAddr0, kEmpty,
+ &buffer);
EXPECT_TRUE(HandleAddressMessage(buffer));
AddressTrackerLinux::AddressMap map = GetAddressMap();
EXPECT_EQ(1u, map.size());
« no previous file with comments | « no previous file | net/base/cache_type.h » ('j') | net/base/data_url_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698