chromium/mojo/public/cpp/bindings/tests/pickle_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 <string>
#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/tests/pickled_types_blink.h"
#include "mojo/public/cpp/bindings/tests/pickled_types_chromium.h"
#include "mojo/public/cpp/bindings/tests/variant_test_util.h"
#include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-blink.h"
#include "mojo/public/interfaces/bindings/tests/test_native_types.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo {
namespace test {
namespace {

template <typename T>
void DoExpectResult(int foo, int bar, base::OnceClosure callback, T actual) {}

template <typename T>
base::OnceCallback<void(T)> ExpectResult(const T& t,
                                         base::OnceClosure callback) {}

template <typename T>
void DoFail(const std::string& reason, T) {}

template <typename T>
base::OnceCallback<void(T)> Fail(const std::string& reason) {}

template <typename T>
void DoExpectEnumResult(T expected, base::OnceClosure callback, T actual) {}

template <typename T>
base::OnceCallback<void(T)> ExpectEnumResult(T t, base::OnceClosure callback) {}

template <typename T>
void DoEnumFail(const std::string& reason, T) {}

template <typename T>
base::OnceCallback<void(T)> EnumFail(const std::string& reason) {}

template <typename T>
void ExpectError(Remote<T>* proxy, base::OnceClosure callback) {}

template <typename Func, typename Arg>
void RunSimpleLambda(Func func, Arg arg) {}

template <typename Arg, typename Func>
base::OnceCallback<void(Arg)> BindSimpleLambda(Func func) {}

// This implements the generated Chromium variant of PicklePasser.
class ChromiumPicklePasserImpl : public PicklePasser {};

// This implements the generated Blink variant of PicklePasser.
class BlinkPicklePasserImpl : public blink::PicklePasser {};

// A test which runs both Chromium and Blink implementations of the
// PicklePasser service.
class PickleTest : public testing::Test {};

}  // namespace

TEST_F(PickleTest, ChromiumProxyToChromiumService) {}

TEST_F(PickleTest, ChromiumProxyToBlinkService) {}

TEST_F(PickleTest, BlinkProxyToBlinkService) {}

TEST_F(PickleTest, BlinkProxyToChromiumService) {}

TEST_F(PickleTest, PickleArray) {}

TEST_F(PickleTest, PickleArrayArray) {}

TEST_F(PickleTest, PickleContainer) {}

}  // namespace test
}  // namespace mojo