chromium/ui/ozone/platform/wayland/host/wayland_output_unittest.cc

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

#include "ui/ozone/platform/wayland/host/wayland_output.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/wayland/wayland_display_util.h"
#include "ui/ozone/platform/wayland/host/wayland_output_manager.h"
#include "ui/ozone/platform/wayland/host/xdg_output.h"
#include "ui/ozone/platform/wayland/test/test_wayland_server_thread.h"
#include "ui/ozone/platform/wayland/test/wayland_test.h"

Values;

namespace ui {
namespace {

class MockWaylandOutputDelegate : public WaylandOutput::Delegate {};

}  // namespace

WaylandOutputTest;

// Tests that name and description fall back to ones in the WaylandOutput if
// XDGOutput is not created.
TEST_F(WaylandOutputTest, NameAndDescriptionFallback) {}

// Test that if using xdg output (and supports_viewporter_surface_scaling is
// enabled) the scale factor is calculated as the ratio of physical size to
// logical size as long as it is more than 1, otherwise it is set to 1.
TEST_F(WaylandOutputTest, ScaleFactorCalculation) {}

// Test scale factor falls back to wl_output::scale instead of being calculated
// as the ratio of physical size to logical size when xdg_output is not ready or
// if supports_viewporter_surface_scaling is disabled.
TEST_F(WaylandOutputTest, ScaleFactorFallback) {}

// Test that if using xdg output and viewporter surface scaling is enabled
// the scale factor calculation based on xdg-output's logical size is no-op when
// physical and logical sizes are equal.
//
// Regression test for https://crbug.com/339681887.
TEST_F(WaylandOutputTest, ScaleFactorCalculationNoop) {}

TEST_F(WaylandOutputTest, WaylandOutputIsReady) {}

}  // namespace ui