Commit 74917d5b authored by Alexander Dunaev's avatar Alexander Dunaev Committed by Commit Bot

[ozone/x11] Enabled the test for Ozone and non-Ozone X11.

Bug: 1109112, 439051
Change-Id: Ie32c3c91cb6344c0cbc04040c054bbedc973ec32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531274Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Alexander Dunaev <adunaev@igalia.com>
Auto-Submit: Alexander Dunaev <adunaev@igalia.com>
Cr-Commit-Position: refs/heads/master@{#826623}
parent 448e3a2a
...@@ -16,6 +16,7 @@ include_rules = [ ...@@ -16,6 +16,7 @@ include_rules = [
"+ui/gfx", "+ui/gfx",
"+ui/gl/test/gl_surface_test_support.h", # To initialize GL for tests. "+ui/gl/test/gl_surface_test_support.h", # To initialize GL for tests.
"+ui/native_theme", "+ui/native_theme",
"+ui/ozone/buildflags.h",
"+ui/ozone/public", "+ui/ozone/public",
"+ui/platform_window", "+ui/platform_window",
"+ui/resources/grit/ui_resources.h", "+ui/resources/grit/ui_resources.h",
......
...@@ -51,13 +51,17 @@ ...@@ -51,13 +51,17 @@
#include "ui/views/controls/menu/menu_pre_target_handler.h" #include "ui/views/controls/menu/menu_pre_target_handler.h"
#endif #endif
#if defined(USE_X11)
#include "ui/events/test/events_test_utils_x11.h"
#endif
#if defined(USE_OZONE) #if defined(USE_OZONE)
#include "ui/base/ui_base_features.h" #include "ui/base/ui_base_features.h"
#include "ui/ozone/buildflags.h"
#include "ui/ozone/public/ozone_platform.h" #include "ui/ozone/public/ozone_platform.h"
#if BUILDFLAG(OZONE_PLATFORM_X11)
#define USE_OZONE_PLATFORM_X11
#endif
#endif
#if defined(USE_X11) || defined(USE_OZONE_PLATFORM_X11)
#include "ui/events/test/events_test_utils_x11.h"
#endif #endif
namespace views { namespace views {
...@@ -882,12 +886,16 @@ TEST_F(MenuControllerTest, EventTargeter) { ...@@ -882,12 +886,16 @@ TEST_F(MenuControllerTest, EventTargeter) {
} }
#endif // defined(USE_AURA) #endif // defined(USE_AURA)
#if defined(USE_X11) #if defined(USE_X11) || defined(USE_OZONE_PLATFORM_X11)
// Tests that touch event ids are released correctly. See crbug.com/439051 for // Tests that touch event ids are released correctly. See crbug.com/439051 for
// details. When the ids aren't managed correctly, we get stuck down touches. // details. When the ids aren't managed correctly, we get stuck down touches.
TEST_F(MenuControllerTest, TouchIdsReleasedCorrectly) { TEST_F(MenuControllerTest, TouchIdsReleasedCorrectly) {
if (features::IsUsingOzonePlatform()) // Run this test only for X11 (either Ozone or non-Ozone).
return; if (features::IsUsingOzonePlatform() &&
std::strcmp(ui::OzonePlatform::GetPlatformName(), "x11") != 0) {
GTEST_SKIP();
}
TestEventHandler test_event_handler; TestEventHandler test_event_handler;
GetRootWindow(owner())->AddPreTargetHandler(&test_event_handler); GetRootWindow(owner())->AddPreTargetHandler(&test_event_handler);
...@@ -910,7 +918,7 @@ TEST_F(MenuControllerTest, TouchIdsReleasedCorrectly) { ...@@ -910,7 +918,7 @@ TEST_F(MenuControllerTest, TouchIdsReleasedCorrectly) {
GetRootWindow(owner())->RemovePreTargetHandler(&test_event_handler); GetRootWindow(owner())->RemovePreTargetHandler(&test_event_handler);
} }
#endif // defined(USE_X11) #endif // defined(USE_X11) || defined(USE_OZONE_PLATFORM_X11)
// Tests that initial selected menu items are correct when items are enabled or // Tests that initial selected menu items are correct when items are enabled or
// disabled. // disabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment