#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <tuple>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/multiplex_router.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/shared_associated_remote.h"
#include "mojo/public/cpp/bindings/tests/associated_interface_unittest.test-mojom.h"
#include "mojo/public/cpp/bindings/unique_associated_receiver_set.h"
#include "mojo/public/cpp/system/functions.h"
#include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h"
#include "mojo/public/interfaces/bindings/tests/test_associated_interfaces.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
namespace test {
namespace associated_interface_unittest {
namespace {
MultiplexRouter;
class IntegerSenderImpl : public IntegerSender { … };
class IntegerSenderConnectionImpl : public IntegerSenderConnection { … };
class AssociatedInterfaceTest : public testing::Test { … };
void Fail() { … }
TEST_F(AssociatedInterfaceTest, InterfacesAtBothEnds) { … }
class TestSender { … };
class TestReceiver { … };
class NotificationCounter { … };
TEST_F(AssociatedInterfaceTest, MultiThreadAccess) { … }
TEST_F(AssociatedInterfaceTest, FIFO) { … }
TEST_F(AssociatedInterfaceTest, PassAssociatedInterfaces) { … }
TEST_F(AssociatedInterfaceTest,
ReceiverWaitAndPauseWhenNoAssociatedInterfaces) { … }
class PingServiceImpl : public PingService { … };
class PingProviderImpl : public AssociatedPingProvider { … };
class CallbackFilter : public MessageFilter { … };
TEST_F(AssociatedInterfaceTest, ReceiverWithFilters) { … }
TEST_F(AssociatedInterfaceTest, AssociatedRemoteFlushForTesting) { … }
TEST_F(AssociatedInterfaceTest, AssociatedRemoteFlushForTestingWithClosedPeer) { … }
TEST_F(AssociatedInterfaceTest, AssociatedBindingFlushForTesting) { … }
TEST_F(AssociatedInterfaceTest,
AssociatedReceiverFlushForTestingWithClosedPeer) { … }
TEST_F(AssociatedInterfaceTest, ReceiverFlushForTesting) { … }
TEST_F(AssociatedInterfaceTest, ReceiverFlushForTestingWithClosedPeer) { … }
TEST_F(AssociatedInterfaceTest, RemoteFlushForTesting) { … }
TEST_F(AssociatedInterfaceTest, RemoteFlushForTestingWithClosedPeer) { … }
TEST_F(AssociatedInterfaceTest, AssociatedReceiverConnectionErrorWithReason) { … }
TEST_F(AssociatedInterfaceTest,
PendingAssociatedReceiverConnectionErrorWithReason) { … }
TEST_F(AssociatedInterfaceTest, AssociatedRemoteConnectionErrorWithReason) { … }
TEST_F(AssociatedInterfaceTest,
PendingAssociatedRemoteConnectionErrorWithReason) { … }
TEST_F(AssociatedInterfaceTest, AssociatedRequestResetWithReason) { … }
TEST_F(AssociatedInterfaceTest, SharedAssociatedRemote) { … }
struct ForwarderTestContext { … };
TEST_F(AssociatedInterfaceTest, SharedAssociatedRemoteWithTaskRunner) { … }
class DiscardingAssociatedPingProviderProvider
: public AssociatedPingProviderProvider { … };
TEST_F(AssociatedInterfaceTest, CloseWithoutBindingAssociatedReceiver) { … }
TEST_F(AssociatedInterfaceTest, AssociateWithDisconnectedPipe) { … }
TEST_F(AssociatedInterfaceTest, AsyncErrorHandlersWhenClosingPrimaryInterface) { … }
TEST_F(AssociatedInterfaceTest, AssociatedReceiverReportBadMessage) { … }
TEST_F(AssociatedInterfaceTest, AssociatedReceiverDedicatedPipe) { … }
TEST_F(AssociatedInterfaceTest, AssociatedRemoteDedicatedPipe) { … }
class ClumsyBinderImpl : public mojom::ClumsyBinder { … };
TEST_F(AssociatedInterfaceTest, CloseSerializedAssociatedEndpoints) { … }
}
}
}
}