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 @@ ...@@ -5072,8 +5072,7 @@
{ {
"args": [ "args": [
"--ozone-platform=x11", "--ozone-platform=x11",
"--enable-features=UseOzonePlatform", "--enable-features=UseOzonePlatform"
"--test-launcher-filter-file=../../testing/buildbot/filters/ozone-linux.x11_views_unittests.filter"
], ],
"merge": { "merge": {
"args": [], "args": [],
......
...@@ -157,7 +157,6 @@ source_set("interactive_ui_tests_filters") { ...@@ -157,7 +157,6 @@ source_set("interactive_ui_tests_filters") {
source_set("linux_ozone_views_unittests_filters") { source_set("linux_ozone_views_unittests_filters") {
data = [ data = [
"//testing/buildbot/filters/ozone-linux.x11_views_unittests.filter",
"//testing/buildbot/filters/ozone-linux.wayland_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 @@ ...@@ -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': { 'viz_unittests': {
'modifications': { 'modifications': {
'android-inverse-fieldtrials-pie-x86-fyi-rel': { 'android-inverse-fieldtrials-pie-x86-fyi-rel': {
......
...@@ -126,24 +126,23 @@ gfx::Size WidgetTest::GetNativeWidgetMinimumContentSize(Widget* widget) { ...@@ -126,24 +126,23 @@ gfx::Size WidgetTest::GetNativeWidgetMinimumContentSize(Widget* widget) {
// be pushed to the window server when they change. // be pushed to the window server when they change.
#if !BUILDFLAG(ENABLE_DESKTOP_AURA) || defined(OS_WIN) #if !BUILDFLAG(ENABLE_DESKTOP_AURA) || defined(OS_WIN)
return widget->GetNativeWindow()->delegate()->GetMinimumSize(); return widget->GetNativeWindow()->delegate()->GetMinimumSize();
#elif defined(USE_X11) #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
if (features::IsUsingOzonePlatform()) { #if defined(USE_OZONE)
// TODO(https://crbug.com/1109114): this is effectively the same as the if (features::IsUsingOzonePlatform())
// NOTREACHED in the #else section. Figure why that is there and fix for return widget->GetNativeWindow()->delegate()->GetMinimumSize();
// Ozone if needed. #endif // USE_OZONE
NOTREACHED(); #if defined(USE_X11)
return gfx::Size(); EXPECT_FALSE(features::IsUsingOzonePlatform());
}
ui::SizeHints hints; ui::SizeHints hints;
ui::GetWmNormalHints( ui::GetWmNormalHints(
static_cast<x11::Window>( static_cast<x11::Window>(
widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()), widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()),
&hints); &hints);
return gfx::Size(hints.min_width, hints.min_height); return gfx::Size(hints.min_width, hints.min_height);
#else #endif // USE_X11
#endif // OS_LINUX && !OS_CHROMEOS
NOTREACHED(); NOTREACHED();
return gfx::Size(); return gfx::Size();
#endif
} }
// static // 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