#include "mojo/public/cpp/bindings/remote.h"
#include <stdint.h>
#include <optional>
#include <tuple>
#include <utility>
#include "base/barrier_closure.h"
#include "base/debug/dump_without_crashing.h"
#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/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/task_environment.h"
#include "base/threading/thread.h"
#include "mojo/core/test/mojo_test_base.h"
#include "mojo/public/cpp/bindings/associated_receiver_set.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote_set.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "mojo/public/cpp/bindings/shared_associated_remote.h"
#include "mojo/public/cpp/bindings/shared_remote.h"
#include "mojo/public/cpp/bindings/tests/bindings_test_base.h"
#include "mojo/public/cpp/bindings/tests/remote_unittest.test-mojom.h"
#include "mojo/public/cpp/bindings/unique_receiver_set.h"
#include "mojo/public/cpp/system/wait.h"
#include "mojo/public/interfaces/bindings/tests/math_calculator.mojom.h"
#include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
#include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h"
#include "mojo/public/interfaces/bindings/tests/scoping.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
namespace test {
namespace remote_unittest {
namespace {
class MathCalculatorImpl : public math::Calculator { … };
class MathCalculatorUI { … };
class SelfDestructingMathCalculatorUI { … };
int SelfDestructingMathCalculatorUI::num_instances_ = …;
class ReentrantServiceImpl : public sample::Service { … };
class IntegerAccessorImpl : public sample::IntegerAccessor { … };
class RemoteTest : public BindingsTestBase { … };
TEST_P(RemoteTest, IsBound) { … }
class EndToEndRemoteTest : public RemoteTest { … };
TEST_P(EndToEndRemoteTest, EndToEnd) { … }
TEST_P(EndToEndRemoteTest, EndToEndOnSequence) { … }
TEST_P(RemoteTest, Movable) { … }
TEST_P(RemoteTest, Resettable) { … }
TEST_P(RemoteTest, InvalidPendingRemotes) { … }
TEST_P(RemoteTest, IsConnected) { … }
TEST_P(RemoteTest, DisconnectCallback) { … }
TEST_P(RemoteTest, DestroyRemoteOnMethodResponse) { … }
TEST_P(RemoteTest, NestedDestroyRemoteOnMethodResponse) { … }
TEST_P(RemoteTest, ReentrantWaitForIncomingCall) { … }
TEST_P(RemoteTest, QueryVersion) { … }
TEST_P(RemoteTest, RequireVersion) { … }
class StrongMathCalculatorImpl : public math::Calculator { … };
TEST(StrongConnectorTest, Math) { … }
class WeakMathCalculatorImpl : public math::Calculator { … };
TEST(WeakConnectorTest, Math) { … }
class CImpl : public C { … };
class BImpl : public B { … };
class AImpl : public A { … };
TEST_P(RemoteTest, Scoping) { … }
class PingTestImpl : public sample::PingTest { … };
TEST_P(RemoteTest, Fusion) { … }
void Fail() { … }
TEST_P(RemoteTest, FlushForTesting) { … }
TEST_P(RemoteTest, FlushAsyncForTesting) { … }
TEST_P(RemoteTest, FlushForTestingWithClosedPeer) { … }
TEST_P(RemoteTest, FlushAsyncForTestingWithClosedPeer) { … }
TEST_P(RemoteTest, DisconnectWithReason) { … }
TEST_P(RemoteTest, PendingReceiverResetWithReason) { … }
TEST_P(RemoteTest, CallbackIsPassedRemote) { … }
TEST_P(RemoteTest, DisconnectHandlerOwnsRemote) { … }
TEST_P(RemoteTest, SharedRemote) { … }
TEST_P(RemoteTest, SharedRemoteWithTaskRunner) { … }
class SequenceCheckerImpl : public mojom::SequenceChecker { … };
class SequenceCheckerClientImpl : public mojom::SequenceCheckerClient { … };
TEST_P(RemoteTest, SharedRemotePassAssociatedEndpointsEarly) { … }
TEST_P(RemoteTest, SharedRemoteEarlySyncCall) { … }
TEST_P(RemoteTest, SharedRemoteSyncCallWithPendingEventOnSameThread) { … }
TEST_P(RemoteTest, DISABLED_DisconnectDuringOffThreadSyncWaitWithUnprocessedTasks) { … }
TEST_P(RemoteTest, SharedRemoteDisconnectCallback) { … }
constexpr int32_t kMagicNumber = …;
class SharedRemoteSyncTestImpl : public mojom::SharedRemoteSyncTest { … };
TEST_P(RemoteTest, SharedRemoteSyncOnlyBlocksCallingSequence) { … }
TEST_P(RemoteTest, SharedRemoteSyncCallsFromOffBoundConstructionSequence) { … }
TEST_P(RemoteTest, SharedRemoteSyncCallsFromBoundNonConstructionSequence) { … }
TEST_P(RemoteTest, RemoteSet) { … }
bool* dump_without_crashing_flag;
extern "C" void HandleDumpWithoutCrashing() { … }
class LargeMessageTestImpl : public mojom::LargeMessageTest { … };
TEST_P(RemoteTest, DISABLED_SendVeryLargeMessages) { … }
INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(…);
INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(…);
}
}
}
}