chromium/mojo/public/cpp/bindings/tests/handle_passing_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.

#include <stdint.h>

#include <string_view>
#include <utility>

#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/tests/bindings_test_base.h"
#include "mojo/public/cpp/bindings/unique_receiver_set.h"
#include "mojo/public/cpp/system/wait.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "mojo/public/interfaces/bindings/tests/sample_factory.mojom.h"
#include "mojo/public/interfaces/bindings/tests/sample_import.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo {
namespace test {
namespace {

const char kText1[] =;
const char kText2[] =;

void RecordString(std::string* storage,
                  base::OnceClosure closure,
                  const std::string& str) {}

base::OnceCallback<void(const std::string&)> MakeStringRecorder(
    std::string* storage,
    base::OnceClosure closure) {}

class ImportedInterfaceImpl : public imported::ImportedInterface {};
int ImportedInterfaceImpl::do_something_count_ =;

class SampleNamedObjectImpl : public sample::NamedObject {};

class SampleFactoryImpl : public sample::Factory {};

class HandlePassingTest : public BindingsTestBase {};

void DoStuff(bool* got_response,
             std::string* got_text_reply,
             base::OnceClosure closure,
             sample::ResponsePtr response,
             const std::string& text_reply) {}

void DoStuff2(bool* got_response,
              std::string* got_text_reply,
              base::OnceClosure closure,
              const std::string& text_reply) {}

TEST_P(HandlePassingTest, Basic) {}

TEST_P(HandlePassingTest, PassInvalid) {}

// Verifies DataPipeConsumer can be passed and read from.
TEST_P(HandlePassingTest, DataPipe) {}

TEST_P(HandlePassingTest, CreateNamedObject) {}

INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P();

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