#include "mojo/public/cpp/bindings/receiver.h"
#include <stdint.h>
#include <optional>
#include <utility>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/bind.h"
#include "base/threading/thread.h"
#include "build/blink_buildflags.h"
#include "mojo/core/embedder/embedder.h"
#include "mojo/core/test/mojo_test_base.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "mojo/public/cpp/bindings/tests/bindings_test_base.h"
#include "mojo/public/cpp/bindings/tests/receiver_unittest.test-mojom.h"
#include "mojo/public/cpp/system/functions.h"
#include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h"
#include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
#include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
namespace test {
namespace receiver_unittest {
class ServiceImpl : public sample::Service { … };
ReceiverTest;
TEST_P(ReceiverTest, Reset) { … }
TEST_P(ReceiverTest, DestroyClosesMessagePipe) { … }
TEST_P(ReceiverTest, Disconnect) { … }
TEST_P(ReceiverTest, ResetDoesntCallDisconnectHandler) { … }
class ServiceImplWithReceiver : public ServiceImpl { … };
TEST_P(ReceiverTest, SelfDeleteOnDisconnect) { … }
TEST_P(ReceiverTest, Unbind) { … }
class IntegerAccessorImpl : public sample::IntegerAccessor { … };
TEST_P(ReceiverTest, PauseResume) { … }
TEST_P(ReceiverTest, ErrorHandleNotRunWhilePaused) { … }
class PingServiceImpl : public test::PingService { … };
class CallbackFilter : public MessageFilter { … };
TEST_P(ReceiverTest, MessageFilter) { … }
void Fail() { … }
TEST_P(ReceiverTest, FlushForTesting) { … }
TEST_P(ReceiverTest, FlushForTestingWithClosedPeer) { … }
TEST_P(ReceiverTest, DisconnectWithReason) { … }
TEST_P(ReceiverTest, PendingRemoteResetWithReason) { … }
template <typename T>
struct WeakPtrImplRefTraits { … };
WeakReceiver;
TEST_P(ReceiverTest, CustomImplPointerType) { … }
TEST_P(ReceiverTest, ReportBadMessage) { … }
TEST_P(ReceiverTest, GetBadMessageCallback) { … }
TEST_P(ReceiverTest, InvalidPendingReceivers) { … }
TEST_P(ReceiverTest, GenericPendingReceiver) { … }
TEST_P(ReceiverTest, GenericPendingAssociatedReceiver) { … }
class RebindTestImpl : public mojom::RebindTestInterface { … };
TEST_P(ReceiverTest, RebindWithScheduledSyncMessage) { … }
class TestGenericBinderImpl : public mojom::TestGenericBinder { … };
ReceiverSerializationTest;
TEST_P(ReceiverSerializationTest, NullGenericPendingReceiver) { … }
TEST_P(ReceiverSerializationTest, NullGenericPendingAssociatedReceiver) { … }
SelfOwnedReceiverTest;
TEST_P(SelfOwnedReceiverTest, CloseDestroysImplAndPipe) { … }
TEST_P(SelfOwnedReceiverTest, DisconnectDestroysImplAndPipe) { … }
class MultiprocessReceiverTest : public core::test::MojoTestBase,
public mojom::TestInterface1 { … };
class InterfaceDropper : public mojom::InterfaceDropper { … };
DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessReceiverClient,
MultiprocessReceiverTest,
test_pipe) { … }
#if !BUILDFLAG(IS_IOS)
TEST_F(MultiprocessReceiverTest, MultiprocessReceiver) { … }
#endif
INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(…);
INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}
}
}