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

Unified Diff: net/quic/platform/api/quic_test_loopback.h

Issue 2933613002: Add quic_test_loopback used for tests only. (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/platform/api/quic_ip_address.h ('k') | net/quic/platform/api/quic_test_loopback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/platform/api/quic_test_loopback.h
diff --git a/net/quic/platform/api/quic_test_loopback.h b/net/quic/platform/api/quic_test_loopback.h
new file mode 100644
index 0000000000000000000000000000000000000000..db7d2c085c03cef3d8349aa7e017ab8411bce114
--- /dev/null
+++ b/net/quic/platform/api/quic_test_loopback.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_QUIC_PLATFORM_API_QUIC_TEST_LOOPBACK_H_
+#define NET_QUIC_PLATFORM_API_QUIC_TEST_LOOPBACK_H_
+
+#include "net/quic/platform/impl/quic_test_loopback_impl.h"
+
+namespace net {
+
+// Returns the address family (IPv4 or IPv6) used to run test under.
+IpAddressFamily AddressFamilyUnderTest();
+
+// Returns an IPv4 loopback address.
+QuicIpAddress TestLoopback4();
+
+// Returns the only IPv6 loopback address.
+QuicIpAddress TestLoopback6();
+
+// Returns an appropriate IPv4/Ipv6 loopback address based upon whether the
+// test's environment.
+QuicIpAddress TestLoopback();
+
+// If address family under test is IPv4, returns an indexed IPv4 loopback
+// address. If address family under test is IPv6, the address returned is
+// platform-dependent.
+QuicIpAddress TestLoopback(int index);
+
+} // namespace net
+
+#endif // NET_QUIC_PLATFORM_API_QUIC_TEST_LOOPBACK_H_
« no previous file with comments | « net/quic/platform/api/quic_ip_address.h ('k') | net/quic/platform/api/quic_test_loopback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698