#include "mojo/public/cpp/bindings/direct_receiver.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/message_loop/message_pump_type.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/threading/sequence_bound.h"
#include "base/threading/thread.h"
#include "mojo/core/embedder/embedder.h"
#include "mojo/core/test/mojo_test_base.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/tests/direct_receiver_unittest.test-mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/ipcz/src/test/test_base.h"
namespace mojo::test::direct_receiver_unittest {
namespace {
template <typename Fn>
void RunOn(base::Thread& thread, Fn closure) { … }
}
class DirectReceiverTest : public ipcz::test::internal::TestBase,
public core::test::MojoTestBase { … };
class ScopedPauseIOThread { … };
class ServiceImpl : public mojom::Service { … };
class ServiceRunner { … };
TEST_F(DirectReceiverTest, NoIOThreadHopInBroker) { … }
DEFINE_TEST_CLIENT_TEST_WITH_PIPE(NoIOThreadHopInBroker_Child,
DirectReceiverTest,
test_pipe_handle) { … }
TEST_F(DirectReceiverTest, NoIOThreadHopInNonBrokerProcess) { … }
DEFINE_TEST_CLIENT_TEST_WITH_PIPE(NoIOThreadHopInNonBroker_Child,
DirectReceiverTest,
test_pipe_handle) { … }
TEST_F(DirectReceiverTest, ThreadLocalInstanceShared) { … }
TEST_F(DirectReceiverTest, UniqueNodePerThread) { … }
}