Commit 7139be2f authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

ozone/x11: fix views_unittests

All the tests except DesktopWidgetTest.MinimumSizeConstraints
pass without any modifications.

The DesktopWidgetTest.MinimumSizeConstraints required providing
minimum size during the call to WidgetTest::GetNativeWidgetMinimumContentSize.

Bug: 1001075, 1109114
Change-Id: I4bc0b76d39f981694441d9d0e78d58d4cc5345d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2444312Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Maksim Sisov (GMT+2) <msisov@igalia.com>
Auto-Submit: Maksim Sisov (GMT+2) <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#824311}
parent 103909cc
......@@ -5072,8 +5072,7 @@
{
"args": [
"--ozone-platform=x11",
"--enable-features=UseOzonePlatform",
"--test-launcher-filter-file=../../testing/buildbot/filters/ozone-linux.x11_views_unittests.filter"
"--enable-features=UseOzonePlatform"
],
"merge": {
"args": [],
......
......@@ -157,7 +157,6 @@ source_set("interactive_ui_tests_filters") {
source_set("linux_ozone_views_unittests_filters") {
data = [
"//testing/buildbot/filters/ozone-linux.x11_views_unittests.filter",
"//testing/buildbot/filters/ozone-linux.wayland_views_unittests.filter",
]
}
......
# https://crbug.com/1001075: Fix this failing tests for Ozone/X11.
-DesktopWidgetObserverTest.OnWidgetMovedWhenOriginChangesNative
-DesktopWidgetTest.GetWindowPlacement
-DesktopWidgetTest.ValidDuringOnNativeWidgetDestroyingFromCloseNow
-DesktopWidgetTestTest.GetAllWidgets
-DesktopWindowTreeHostPlatformTest.CallOnNativeWidgetDestroying
-DesktopAuraWidgetTest.CloseWidgetDuringMousePress
-DesktopNativeWidgetAuraTest.DesktopAuraWindowShowFrameless
-DesktopWidgetTest.CloseAllSecondaryWidgets
-DesktopWidgetTest.CloseRequested_AllowsClose
-DesktopWidgetTest.CloseRequested_DisallowClose
-DesktopWidgetTest.CloseRequested_SecondCloseIgnored
-DesktopWidgetTest.MinimumSizeConstraints
-DesktopWidgetTest.SingleWindowClosing
-DesktopWidgetTest.WidgetDestroyedItselfDoesNotCrash
-TooltipControllerTest.Capture
......@@ -2777,15 +2777,6 @@
},
},
},
'views_unittests_x11': {
'modifications': {
'Linux Ozone Tester (X11)': {
'args': [
'--test-launcher-filter-file=../../testing/buildbot/filters/ozone-linux.x11_views_unittests.filter',
],
},
},
},
'viz_unittests': {
'modifications': {
'android-inverse-fieldtrials-pie-x86-fyi-rel': {
......
......@@ -126,24 +126,23 @@ gfx::Size WidgetTest::GetNativeWidgetMinimumContentSize(Widget* widget) {
// be pushed to the window server when they change.
#if !BUILDFLAG(ENABLE_DESKTOP_AURA) || defined(OS_WIN)
return widget->GetNativeWindow()->delegate()->GetMinimumSize();
#elif defined(USE_X11)
if (features::IsUsingOzonePlatform()) {
// TODO(https://crbug.com/1109114): this is effectively the same as the
// NOTREACHED in the #else section. Figure why that is there and fix for
// Ozone if needed.
NOTREACHED();
return gfx::Size();
}
#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
#if defined(USE_OZONE)
if (features::IsUsingOzonePlatform())
return widget->GetNativeWindow()->delegate()->GetMinimumSize();
#endif // USE_OZONE
#if defined(USE_X11)
EXPECT_FALSE(features::IsUsingOzonePlatform());
ui::SizeHints hints;
ui::GetWmNormalHints(
static_cast<x11::Window>(
widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()),
&hints);
return gfx::Size(hints.min_width, hints.min_height);
#else
#endif // USE_X11
#endif // OS_LINUX && !OS_CHROMEOS
NOTREACHED();
return gfx::Size();
#endif
}
// static
......
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