chromium/ui/display/mojom/display_mojom_traits_unittest.cc

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

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "mojo/public/cpp/base/file_path_mojom_traits.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/display/display.h"
#include "ui/display/display_layout.h"
#include "ui/display/mojom/display.mojom.h"
#include "ui/display/mojom/display_color_management.mojom.h"
#include "ui/display/mojom/display_color_management_mojom_traits.h"
#include "ui/display/mojom/display_layout_mojom_traits.h"
#include "ui/display/mojom/display_mode_mojom_traits.h"
#include "ui/display/mojom/display_mojom_traits.h"
#include "ui/display/mojom/display_snapshot.mojom.h"
#include "ui/display/mojom/display_snapshot_mojom_traits.h"
#include "ui/display/mojom/gamma_ramp_rgb_entry.mojom.h"
#include "ui/display/mojom/gamma_ramp_rgb_entry_mojom_traits.h"
#include "ui/display/types/display_color_management.h"
#include "ui/display/types/display_constants.h"
#include "ui/display/types/display_mode.h"
#include "ui/display/types/display_snapshot.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/mojom/color_space_mojom_traits.h"

namespace display {
namespace {

constexpr int64_t kDisplayId1 =;
constexpr int64_t kDisplayId2 =;
constexpr int64_t kDisplayId3 =;

#define DRM_FORMAT_ARGB8888
#define DRM_FORMAT_MOD_INVALID

void CheckDisplaysEqual(const Display& input, const Display& output) {}

void CheckDisplayLayoutsEqual(const DisplayLayout& input,
                              const DisplayLayout& output) {}

void CheckDisplayModesEqual(const DisplayMode* input,
                            const DisplayMode* output) {}

void CheckDisplaySnapShotMojoEqual(const DisplaySnapshot& input,
                                   const DisplaySnapshot& output) {}

// Test StructTrait serialization and deserialization for copyable type. |input|
// will be serialized and then deserialized into |output|.
template <class MojomType, class Type>
void SerializeAndDeserialize(const Type& input, Type* output) {}

// Test StructTrait serialization and deserialization for move only type.
// |input| will be serialized and then deserialized into |output|.
template <class MojomType, class Type>
void SerializeAndDeserialize(Type&& input, Type* output) {}

}  // namespace

TEST(DisplayStructTraitsTest, DefaultDisplayValues) {}

TEST(DisplayStructTraitsTest, SetAllDisplayValues) {}

TEST(DisplayStructTraitsTest, DefaultDisplayMode) {}

TEST(DisplayStructTraitsTest, DisplayPlacementFlushAtTop) {}

TEST(DisplayStructTraitsTest, DisplayPlacementWithOffset) {}

TEST(DisplayStructTraitsTest, DisplayLayoutTwoExtended) {}

TEST(DisplayStructTraitsTest, DisplayLayoutThreeExtended) {}

TEST(DisplayStructTraitsTest, BasicGammaRampRGBEntry) {}

TEST(DisplayStructTraitsTest, ColorCalibrationRoundtrip) {}

TEST(DisplayStructTraitsTest, ColorTemperatureAdjustmentRoundtrip) {}

TEST(DisplayStructTraitsTest, GammaAdjustmentRoundtrip) {}

// One display mode, current and native mode nullptr.
TEST(DisplayStructTraitsTest, DisplaySnapshotCurrentAndNativeModesNull) {}

// One display mode that is the native mode and no current mode.
TEST(DisplayStructTraitsTest, DisplaySnapshotCurrentModeNull) {}

// Multiple display modes, both native and current mode set.
TEST(DisplayStructTraitsTest, DisplaySnapshotExternal) {}

TEST(DisplayStructTraitsTest, DisplaySnapshotInternal) {}

}  // namespace display