chromium/mojo/public/cpp/bindings/tests/connector_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "mojo/public/cpp/bindings/connector.h"

#include <stddef.h>
#include <stdlib.h>
#include <string.h>

#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/cpp/bindings/tests/message_queue.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo {
namespace test {
namespace {

class MessageAccumulator : public MessageReceiver {};

class ConnectorDeletingMessageAccumulator : public MessageAccumulator {};

class ReentrantMessageAccumulator : public MessageAccumulator {};

class ConnectorTest : public testing::Test {};

TEST_F(ConnectorTest, Basic) {}

TEST_F(ConnectorTest, Basic_Synchronous) {}

TEST_F(ConnectorTest, Basic_EarlyIncomingReceiver) {}

TEST_F(ConnectorTest, Basic_TwoMessages) {}

TEST_F(ConnectorTest, Basic_TwoMessages_Synchronous) {}

TEST_F(ConnectorTest, WriteToClosedPipe) {}

TEST_F(ConnectorTest, MessageWithHandles) {}

TEST_F(ConnectorTest, WaitForIncomingMessageWithError) {}

TEST_F(ConnectorTest, WaitForIncomingMessageWithDeletion) {}

TEST_F(ConnectorTest, WaitForIncomingMessageWithReentrancy) {}

void ForwardErrorHandler(bool* called, base::OnceClosure callback) {}

TEST_F(ConnectorTest, RaiseError) {}

void PauseConnectorAndRunClosure(Connector* connector,
                                 base::OnceClosure closure) {}

TEST_F(ConnectorTest, PauseWithQueuedMessages) {}

void AccumulateWithNestedLoop(MessageAccumulator* accumulator,
                              base::OnceClosure closure) {}

TEST_F(ConnectorTest, ProcessWhenNested) {}

TEST_F(ConnectorTest, DestroyOnDifferentThreadAfterClose) {}

}  // namespace
}  // namespace test
}  // namespace mojo