wayland_display_util_unittest.cc 900 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/exo/wayland/wayland_display_util.h"
  5. #include <wayland-server-protocol-core.h>
  6. #include "testing/gtest/include/gtest/gtest.h"
  7. #include "ui/display/display.h"
  8. namespace exo {
  9. namespace wayland {
  10. namespace {
  11. TEST(WaylandDisplayUtilTest, OutputTransformSimple) {
  12. EXPECT_EQ(OutputTransform(display::Display::ROTATE_0),
  13. WL_OUTPUT_TRANSFORM_NORMAL);
  14. EXPECT_EQ(OutputTransform(display::Display::ROTATE_90),
  15. WL_OUTPUT_TRANSFORM_270);
  16. EXPECT_EQ(OutputTransform(display::Display::ROTATE_180),
  17. WL_OUTPUT_TRANSFORM_180);
  18. EXPECT_EQ(OutputTransform(display::Display::ROTATE_270),
  19. WL_OUTPUT_TRANSFORM_90);
  20. }
  21. } // namespace
  22. } // namespace wayland
  23. } // namespace exo