diff --git a/src/Core/tests/DeviceTests.Shared/HandlerTests/HandlerTestBaseOfT.Tests.cs b/src/Core/tests/DeviceTests.Shared/HandlerTests/HandlerTestBaseOfT.Tests.cs index d8402359b9b8..c6c6dfbe3f6a 100644 --- a/src/Core/tests/DeviceTests.Shared/HandlerTests/HandlerTestBaseOfT.Tests.cs +++ b/src/Core/tests/DeviceTests.Shared/HandlerTests/HandlerTestBaseOfT.Tests.cs @@ -264,11 +264,7 @@ public async Task ReturnsNonEmptyPlatformViewBounds(int size) Assert.NotEqual(platformViewBounds, new Graphics.Rect()); } - [Theory(DisplayName = "Native View Bounding Box is not empty" -#if WINDOWS - , Skip = "https://github.com/dotnet/maui/issues/9054" -#endif - )] + [Theory(DisplayName = "Native View Bounding Box is not empty")] [InlineData(1)] [InlineData(100)] [InlineData(1000)] @@ -306,6 +302,12 @@ public virtual async Task ReturnsNonEmptyNativeBoundingBox(int size) { // https://github.com/dotnet/maui/issues/11020 } +#endif +#if WINDOWS + else if (view is IContentView) + { + // https://github.com/dotnet/maui/issues/20228 + } #endif else if (view is IProgress) { diff --git a/src/Core/tests/DeviceTests/Handlers/DatePicker/DatePickerHandlerTests.Windows.cs b/src/Core/tests/DeviceTests/Handlers/DatePicker/DatePickerHandlerTests.Windows.cs index 93922e72e671..fea46b3b3c8e 100644 --- a/src/Core/tests/DeviceTests/Handlers/DatePicker/DatePickerHandlerTests.Windows.cs +++ b/src/Core/tests/DeviceTests/Handlers/DatePicker/DatePickerHandlerTests.Windows.cs @@ -9,6 +9,28 @@ namespace Microsoft.Maui.DeviceTests { public partial class DatePickerHandlerTests { + [Theory(DisplayName = "Native View Bounding Box is not empty")] + [InlineData(1)] + [InlineData(100)] + [InlineData(1000)] + public override async Task ReturnsNonEmptyNativeBoundingBox(int size) + { + var datePicker = new DatePickerStub() + { + Height = size, + Width = size, + Date = DateTime.Today, + MinimumDate = DateTime.Today.AddDays(-1), + MaximumDate = DateTime.Today.AddDays(1) + }; + + var nativeBoundingBox = await GetValueAsync(datePicker, handler => GetBoundingBox(handler)); + Assert.NotEqual(nativeBoundingBox, Rect.Zero); + + var expectedSize = new Size(size, size); + AssertWithinTolerance(expectedSize, nativeBoundingBox.Size); + } + [Fact] public override async Task DisconnectHandlerDoesntCrash() {