chromium/ui/ozone/platform/x11/x11_screen_ozone_unittest.cc

// Copyright 2018 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/x11/x11_screen_ozone.h"

#include <memory>

#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/x/x11_display_manager.h"
#include "ui/display/display.h"
#include "ui/display/display_observer.h"
#include "ui/events/platform/x11/x11_event_source.h"
#include "ui/gfx/font_render_params.h"
#include "ui/ozone/platform/x11/x11_window.h"
#include "ui/ozone/platform/x11/x11_window_manager.h"
#include "ui/ozone/test/mock_platform_window_delegate.h"
#include "ui/platform_window/platform_window_delegate.h"
#include "ui/platform_window/platform_window_init_properties.h"

_;

namespace ui {

namespace {

constexpr gfx::Rect kPrimaryDisplayBounds(0, 0, 800, 600);

constexpr int64_t kFirstDisplay =;
constexpr int64_t kSecondDisplay =;

ACTION_P(StoreWidget, widget_ptr) {}

int64_t NextDisplayId() {}

struct MockDisplayObserver : public display::DisplayObserver {};

}  // namespace

class X11ScreenOzoneTest : public testing::Test {};

// This test case ensures that PlatformScreen correctly provides the display
// list as they are added/removed.
TEST_F(X11ScreenOzoneTest, AddRemoveListDisplays) {}

// This test case exercises GetDisplayForAcceleratedWidget when simple cases
// for platform windows in a single-display setup.
TEST_F(X11ScreenOzoneTest, GetDisplayForWidgetSingleDisplay) {}

// This test case exercises GetDisplayForAcceleratedWidget when simple cases
// for platform windows in a 2 side-by-side displays setup.
TEST_F(X11ScreenOzoneTest, GetDisplayForWidgetTwoDisplays) {}

// This test case exercises GetDisplayNearestPoint function simulating 2
// side-by-side displays setup.
TEST_F(X11ScreenOzoneTest, GetDisplayNearestPointTwoDisplays) {}

// This test case exercises GetDisplayMatching function with both single and
// side-by-side display setup
TEST_F(X11ScreenOzoneTest, GetDisplayMatchingMultiple) {}

TEST_F(X11ScreenOzoneTest, BoundsChangeSingleMonitor) {}

TEST_F(X11ScreenOzoneTest, AddMonitorToTheRight) {}

TEST_F(X11ScreenOzoneTest, AddMonitorToTheLeft) {}

TEST_F(X11ScreenOzoneTest, RemoveMonitorOnRight) {}

TEST_F(X11ScreenOzoneTest, RemoveMonitorOnLeft) {}

TEST_F(X11ScreenOzoneTest, GetDisplayNearestPoint) {}

TEST_F(X11ScreenOzoneTest, GetDisplayMatchingBasic) {}

TEST_F(X11ScreenOzoneTest, GetDisplayMatchingOverlap) {}

TEST_F(X11ScreenOzoneTest, GetPrimaryDisplay) {}

TEST_F(X11ScreenOzoneTest, GetDisplayNearestWindow) {}

// Test that rotating the displays notifies the DisplayObservers.
TEST_F(X11ScreenOzoneTest, RotationChange) {}

// Test that changing the displays workarea notifies the DisplayObservers.
TEST_F(X11ScreenOzoneTest, WorkareaChange) {}

// Test that changing the device scale factor notifies the DisplayObservers.
TEST_F(X11ScreenOzoneTest, DeviceScaleFactorChange) {}

}  // namespace ui