#include <string>
#include "build/build_config.h"
#include "ipcz/ipcz.h"
#include "ipcz/node_messages.h"
#include "reference_drivers/async_reference_driver.h"
#include "reference_drivers/sync_reference_driver.h"
#include "test/multinode_test.h"
#include "test/test_transport_listener.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/synchronization/notification.h"
#if !defined(IPCZ_STANDALONE)
#include "base/sanitizer_buildflags.h"
#endif
namespace ipcz {
namespace {
class ConnectTestNode : public test::TestNode { … };
ConnectTest;
MULTINODE_TEST_NODE(ConnectTestNode, BrokerToNonBrokerClient) { … }
MULTINODE_TEST(ConnectTest, BrokerToNonBroker) { … }
constexpr size_t kNumBrokerPortals = …;
constexpr size_t kNumNonBrokerPortals = …;
static_assert …;
MULTINODE_TEST_NODE(ConnectTestNode, SurplusPortalsClient) { … }
MULTINODE_TEST(ConnectTest, SurplusPortals) { … }
MULTINODE_TEST_NODE(ConnectTestNode, ExpectDisconnectFromBroker) { … }
#if defined(IPCZ_STANDALONE)
#define MAYBE_DisconnectWithoutBrokerHandshake …
#elif BUILDFLAG(USING_SANITIZER)
#define MAYBE_DisconnectWithoutBrokerHandshake …
#else
#define MAYBE_DisconnectWithoutBrokerHandshake …
#endif
MULTINODE_TEST(ConnectTest, MAYBE_DisconnectWithoutBrokerHandshake) { … }
MULTINODE_TEST_NODE(ConnectTestNode,
DisconnectWithoutNonBrokerHandshakeClient) {
}
MULTINODE_TEST(ConnectTest, DisconnectWithoutNonBrokerHandshake) { … }
MULTINODE_TEST(ConnectTest, DisconnectOnBadBrokerMessage) { … }
MULTINODE_TEST_NODE(ConnectTestNode, TransmitSomeGarbage) { … }
MULTINODE_TEST(ConnectTest, DisconnectOnBadNonBrokerMessage) { … }
constexpr std::string_view kBlob1Contents = …;
constexpr std::string_view kBlob2Contents = …;
MULTINODE_TEST_NODE(ConnectTestNode, NonBrokerToNonBrokerClientChild) { … }
MULTINODE_TEST_NODE(ConnectTestNode, NonBrokerToNonBrokerClient) { … }
MULTINODE_TEST(ConnectTest, NonBrokerToNonBroker) { … }
MULTINODE_TEST_NODE(ConnectTestNode, BadNonBrokerReferralClient) { … }
MULTINODE_TEST(ConnectTest, BadNonBrokerReferral) { … }
MULTINODE_TEST_NODE(ConnectTestNode, FailedNonBrokerReferralReferredClient) { … }
MULTINODE_TEST_NODE(ConnectTestNode, FailedNonBrokerReferralClient) { … }
MULTINODE_TEST(ConnectTest, FailedNonBrokerReferral) { … }
MULTINODE_TEST_BROKER_NODE(ConnectTestNode, AnotherBroker) { … }
MULTINODE_TEST(ConnectTest, BrokerToBroker) { … }
MULTINODE_TEST_NODE(ConnectTestNode, BrokerClient) { … }
MULTINODE_TEST_BROKER_NODE(ConnectTestNode, BrokerWithClientNode) { … }
MULTINODE_TEST(ConnectTest, MultiBrokerIntroductions) { … }
class ReconnectTestNode : public ConnectTestNode { … };
ReconnectTest;
MULTINODE_TEST_NODE(ReconnectTestNode, ReconnectionTestNonBroker) { … }
MULTINODE_TEST(ReconnectTest, BrokerNonBroker) { … }
MULTINODE_TEST_BROKER_NODE(ReconnectTestNode, ReconnectionTestBroker) { … }
MULTINODE_TEST(ReconnectTest, BrokerBroker) { … }
MULTINODE_TEST_NODE(ReconnectTestNode, TransitiveReconnectClientA) { … }
MULTINODE_TEST_NODE(ReconnectTestNode, TransitiveReconnectClientB) { … }
MULTINODE_TEST(ReconnectTest, TransitiveReconnection) { … }
}
}