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

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

#include "mojo/public/cpp/bindings/lib/multiplex_router.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/interface_endpoint_client.h"
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
#include "mojo/public/cpp/bindings/tests/message_queue.h"
#include "mojo/public/cpp/bindings/tests/router_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo {
namespace test {
namespace {

const char kTestInterfaceName[] =;

IPCStableHashFunction MessageToMethodInfo(Message& message) {}

const char* MessageToMethodName(Message& message) {}

MultiplexRouter;

class MultiplexRouterTest : public testing::Test {};

TEST_F(MultiplexRouterTest, BasicRequestResponse) {}

TEST_F(MultiplexRouterTest, BasicRequestResponse_Synchronous) {}

// Tests MultiplexRouter using the LazyResponseGenerator. The responses will not
// be sent until after the requests have been accepted.
TEST_F(MultiplexRouterTest, LazyResponses) {}

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

// Tests that if the receiving application destroys the responder_ without
// sending a response, then we trigger connection error at both sides. Moreover,
// both sides still appear to have a valid message pipe handle bound.
TEST_F(MultiplexRouterTest, MissingResponses) {}

TEST_F(MultiplexRouterTest, LateResponse) {}

// TODO(yzshen): add more tests.

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