Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f2ff5f3
added iOS and Mac resaving images
TamilarasanSF4853 Jun 15, 2026
5a07e5f
updated TabbedPageTests due to PR 35543
TamilarasanSF4853 Jun 15, 2026
d5834ad
added iOS 18 and iOS 26 images
TamilarasanSF4853 Jun 15, 2026
77b2073
Modify test
HarishwaranVijayakumar Jun 15, 2026
39b9f92
Modify test order
HarishwaranVijayakumar Jun 15, 2026
8f76147
delete json
HarishwaranVijayakumar Jun 15, 2026
c2bdfd9
Device test added for issue 195422
SubhikshaSf4851 Jun 16, 2026
fc17e53
image added
devanathan-vaithiyanathan Jun 16, 2026
9aed039
updated test for mac
TamilarasanSF4853 Jun 17, 2026
bfeeae9
updated Issue35401 test case
TamilarasanSF4853 Jun 17, 2026
ce057dc
resaved TabTitlesShouldNotBeTruncated image
TamilarasanSF4853 Jun 17, 2026
2e7faa4
updated mac image
TamilarasanSF4853 Jun 17, 2026
de57658
updated the windows image
TamilarasanSF4853 Jun 17, 2026
6cd0472
added iOS 26 image
TamilarasanSF4853 Jun 19, 2026
f3f27cc
Guard flaky tests with platform conditionals
HarishKumarSF4517 Jun 18, 2026
7fb17db
updated NavigationPageTests
TamilarasanSF4853 Jun 19, 2026
14ac608
resaved VerifyClearButtonVisiblityWhenTextAlignedHorizontally image
TamilarasanSF4853 Jun 19, 2026
44ae358
Replace Picker CharacterSpacing device tests with UI tests
SyedAbdulAzeemSF4852 Jun 19, 2026
5a45138
added imaged and test changes
TamilarasanSF4853 Jun 25, 2026
451c7dd
Revert "resaved VerifyClearButtonVisiblityWhenTextAlignedHorizontally…
TamilarasanSF4853 Jun 25, 2026
f0b8f91
changed the url
TamilarasanSF4853 Jun 25, 2026
b481dd5
changed url and WebViewFeatureTests test
TamilarasanSF4853 Jun 25, 2026
ddc7fbc
changed the source url
TamilarasanSF4853 Jun 25, 2026
ecfe3ef
added mac image
TamilarasanSF4853 Jun 26, 2026
480bf10
changed the url
TamilarasanSF4853 Jun 26, 2026
393bf63
resaved windows editor image
TamilarasanSF4853 Jun 26, 2026
d523c5d
added memory leak failing test condition
TamilarasanSF4853 Jun 26, 2026
a92abdd
Revert "added iOS 26 image"
TamilarasanSF4853 Jun 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ await collectionView.AttachAndRun<CollectionViewHandler>(async (handler) =>
}, MauiContext, (view) => CreateHandlerAsync<CollectionViewHandler>(view));
}

#if TEST_FAILS_ON_ANDROID && TESTS_FAILS_ON_WINDOWS && TESTS_FAILS_ON_IOS && TESTS_FAILS_ON_MACCATALYST // For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact]
public async Task ItemsSourceDoesNotLeak()
{
Expand Down Expand Up @@ -166,6 +167,7 @@ await CreateHandlerAndAddToWindow<WindowHandlerStub>(new Window(navPage), async

await AssertionExtensions.WaitForGC([.. weakReferences]);
}
#endif

[Fact(
#if IOS || MACCATALYST || WINDOWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ await CreateHandlerAndAddToWindow<CollectionViewHandler>(collectionView, async h
});
}

#if TESTS_FAILS_ON_IOS // For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact("Cells Do Not Leak")]
public async Task CellsDoNotLeak()
{
Expand Down Expand Up @@ -183,6 +184,7 @@ await InvokeOnMainThreadAsync(() =>
await AssertionExtensions.WaitForGC([.. labels]);
#endif
}
#endif

//src/Compatibility/Core/tests/iOS/ObservableItemsSourceTests.cs
[Fact(DisplayName = "IndexPath Range Generation Is Correct")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ await CreateHandlerAndAddToWindow<LayoutHandler>(layout, async _ =>
});
}

#if TESTS_FAILS_ON_WINDOWS //For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact("Cells Do Not Leak"
#if !WINDOWS
, Skip = "Skip for now on other platforms, due to how cells are recycled this does not pass."
Expand Down Expand Up @@ -392,6 +393,7 @@ await CreateHandlerAndAddToWindow<ListViewRenderer>(listView, async _ =>

await AssertionExtensions.WaitForGC(references.ToArray());
}
#endif

[Fact("Cells Repopulate After Null ItemsSource")]
public async Task CellsRepopulateAfterNullItemsSource()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ await CreateHandlerAndAddToWindow<WindowHandlerStub>(new Window(navPage), async
});
}

#if TESTS_FAILS_ON_IOS && TESTS_FAILS_ON_MACCATALYST //For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact(DisplayName = "Does Not Leak"
#if WINDOWS || ANDROID
, Skip = "Failing https://github.com/dotnet/maui/issues/27411"
Expand Down Expand Up @@ -379,6 +380,7 @@ await CreateHandlerAndAddToWindow<WindowHandlerStub>(window, (handler) =>

await AssertionExtensions.WaitForGC(references.ToArray());
}
#endif

[Fact(DisplayName = "Child Pages Do Not Leak"
#if WINDOWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ await InvokeOnMainThreadAsync(async () =>
}
#endif

#if TESTS_FAILS_ON_WINDOWS // For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact]
[Category(TestCategory.RadioButton)]
public async Task RadioButtonHandlerShouldNotLeak()
Expand Down Expand Up @@ -101,5 +102,6 @@ await InvokeOnMainThreadAsync(() =>

await AssertionExtensions.WaitForGC(radioButtonHandlerRef, layoutHandlerRef, layoutPlatformRef, radioButtonPlatformRef);
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ await AttachAndRun(scroll, async (handler) =>
});
}

#if TEST_FAILS_ON_ANDROID && TESTS_FAILS_ON_WINDOWS && TESTS_FAILS_ON_IOS // For more information, see: https://github.com/dotnet/maui/issues/35985
// NOTE: this test is slightly different than MemoryTests.HandlerDoesNotLeak
// It calls CreateHandlerAndAddToWindow(), a valid test case.
[Fact(DisplayName = "ScrollView Does Not Leak"
Expand Down Expand Up @@ -138,6 +139,7 @@ await CreateHandlerAndAddToWindow(page, () =>

await AssertionExtensions.WaitForGC(viewReference, handlerReference, platformReference);
}
#endif

[Fact(DisplayName = "ScrollView inside layouts do not grow")]
public async Task DoesNotGrow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
using NavigationView = Microsoft.UI.Xaml.Controls.NavigationView;
using WFrameworkElement = Microsoft.UI.Xaml.FrameworkElement;
using WNavigationViewItem = Microsoft.UI.Xaml.Controls.NavigationViewItem;
using WRectangleGeometry = Microsoft.UI.Xaml.Media.RectangleGeometry;
using WVisualTreeHelper = Microsoft.UI.Xaml.Media.VisualTreeHelper;


namespace Microsoft.Maui.DeviceTests
Expand Down Expand Up @@ -753,6 +755,81 @@ await CreateHandlerAndAddToWindow<ShellHandler>(shell, async (handler) =>
});
}

[Fact(DisplayName = "Shell FlyoutItem Grid with Star Column Expands to Full Pane Width")]
public async Task ShellFlyoutItemGridExpandsToFullPaneWidth()
{
// Regression test for https://github.com/dotnet/maui/issues/19542
// ShellFlyoutItemView was clipping its content to the minimum measured width
// instead of the final arranged width, causing Grid star columns to not expand.
SetupBuilder();

Controls.Grid templateGrid = null;

var shell = await CreateShellAsync(shell =>
{
shell.FlyoutBehavior = FlyoutBehavior.Flyout;

shell.ItemTemplate = new Controls.DataTemplate(() =>
{
var grid = new Controls.Grid
{
ColumnDefinitions =
{
new Controls.ColumnDefinition { Width = GridLength.Auto },
new Controls.ColumnDefinition { Width = GridLength.Star },
new Controls.ColumnDefinition { Width = GridLength.Auto }
}
};

// Capture the first instance created by the DataTemplate
templateGrid ??= grid;

grid.Add(new Label { Text = "L" }, 0, 0);
grid.Add(new Label { Text = "Title" }, 1, 0);
grid.Add(new Label { Text = "R" }, 2, 0);

return grid;
});

var flyoutItem = new FlyoutItem { Title = "Test Item" };
flyoutItem.Items.Add(new ShellContent { Content = new ContentPage() });
shell.Items.Add(flyoutItem);
});

await CreateHandlerAndAddToWindow<ShellHandler>(shell, async (handler) =>
{
await OpenFlyout(handler);

// Wait for DataTemplate to be inflated and handler assigned
await AssertEventually(() => templateGrid?.Handler?.PlatformView != null);

var platformGrid = templateGrid.Handler.PlatformView as WFrameworkElement;
Assert.NotNull(platformGrid);

// Walk up to find the ShellFlyoutItemView that hosts this content
DependencyObject current = WVisualTreeHelper.GetParent(platformGrid);
Controls.Platform.ShellFlyoutItemView flyoutItemView = null;
while (current != null)
{
if (current is Controls.Platform.ShellFlyoutItemView sfiv)
{
flyoutItemView = sfiv;
break;
}
current = WVisualTreeHelper.GetParent(current);
}

Assert.NotNull(flyoutItemView);

// The Clip must cover the full arranged width, not just the minimum measured width.
// Before the fix, Clip was set in MeasureOverride using request.Width (too small).
// After the fix, Clip is set in ArrangeOverride using finalSize.Width (correct).
var clip = flyoutItemView.Clip as WRectangleGeometry;
Assert.NotNull(clip);
Assert.Equal(Math.Round(flyoutItemView.ActualWidth), Math.Round(clip.Rect.Width));
});
}

async Task TapToSelect(ContentPage page)
{
var shellContent = page.Parent as ShellContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ IEnumerator IEnumerable.GetEnumerator()
}
}

#if TEST_FAILS_ON_ANDROID //For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact(DisplayName = "Does Not Leak"
#if WINDOWS
, Skip = "FIXME: fails on Windows"
Expand Down Expand Up @@ -471,7 +472,7 @@ await CreateHandlerAndAddToWindow<WindowHandlerStub>(new Window(navPage), async

await AssertionExtensions.WaitForGC(pageReference);
}

#endif

TabbedPage CreateBasicTabbedPage(bool bottomTabs = false, bool isSmoothScrollEnabled = true, IEnumerable<Page> pages = null)
{
Expand Down Expand Up @@ -640,8 +641,10 @@ await CreateHandlerAndAddToWindow(new Window(navPage), async () =>
await navPage.Navigation.PushModalAsync(tabbedPage);
await OnLoadedAsync(tabbedPage.Children[0]);

#if !WINDOWS // On Windows, InvalidateGradientBrushRequested is not wired to the TabbedPage renderer/manager, so it is never subscribed.
// Confirm the brush has exactly one subscriber while the page is live.
Assert.Single(GetGradientBrushInvocationList(sharedBrush));
#endif

await navPage.Navigation.PopModalAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ await CreateHandlerAndAddToWindow<IWindowHandler>(mainPage, (handler) =>
});
}

#if TESTS_FAILS_ON_WINDOWS // For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact(DisplayName = "MauiWinUIWindow doesn't leak")]
public async Task MauiWinUIWindowDoesntLeak()
{
Expand All @@ -74,6 +75,7 @@ await CreateHandlerAndAddToWindow<IWindowHandler>(mainPage, async (handler) =>
await AssertionExtensions.WaitForGC(weakReferences.ToArray());
});
}
#endif

[Fact]
public async Task AdornerLayerAdded()
Expand Down
13 changes: 11 additions & 2 deletions src/Controls/tests/DeviceTests/Memory/MemoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ await CreateHandlerAndAddToWindow(new Window(flyoutPage), async () =>
#pragma warning restore CS0618 // Type or member is obsolete
[InlineData(typeof(GraphicsView))]
[InlineData(typeof(Grid))]
#if TESTS_FAILS_ON_WINDOWS //For more information, see: https://github.com/dotnet/maui/issues/35985
[InlineData(typeof(HybridWebView))]
#endif
[InlineData(typeof(Image))]
[InlineData(typeof(ImageButton))]
[InlineData(typeof(IndicatorView))]
Expand All @@ -237,9 +239,13 @@ await CreateHandlerAndAddToWindow(new Window(flyoutPage), async () =>
[InlineData(typeof(ScrollView))]
[InlineData(typeof(SearchBar))]
[InlineData(typeof(Slider))]
#if TESTS_FAILS_ON_IOS && TESTS_FAILS_ON_MACCATALYST //For more information, see: https://github.com/dotnet/maui/issues/35985
[InlineData(typeof(Stepper))]
#endif
[InlineData(typeof(SwipeView))]
#if TESTS_FAILS_ON_MACCATALYST //For more information, see: https://github.com/dotnet/maui/issues/35985
[InlineData(typeof(Switch))]
#endif
[InlineData(typeof(TimePicker))]
#pragma warning disable CS0618 // Type or member is obsolete
[InlineData(typeof(TableView))]
Expand All @@ -258,7 +264,7 @@ public async Task HandlerDoesNotLeak([DynamicallyAccessedMembers(System.Diagnost
// NOTE: skip certain controls on older Android devices
#pragma warning disable CS0618 // Type or member is obsolete
if ((type == typeof(DatePicker) || type == typeof(ListView)) && !OperatingSystem.IsAndroidVersionAtLeast(30))
return;
return;
#pragma warning restore CS0618 // Type or member is obsolete

if (type == typeof(HybridWebView) && !OperatingSystem.IsAndroidVersionAtLeast(24))
Expand Down Expand Up @@ -629,6 +635,7 @@ await CreateHandlerAndAddToWindow(new Window(navPage), async () =>
}
#endif

#if TESTS_FAILS_ON_WINDOWS //For more information, see: https://github.com/dotnet/maui/issues/35985
[Theory("Cells Do Not Leak")]
#pragma warning disable CS0618 // Type or member is obsolete
[InlineData(typeof(TextCell))]
Expand Down Expand Up @@ -698,6 +705,7 @@ await navPage.Navigation.PushAsync(new ContentPage

await AssertionExtensions.WaitForGC(references.ToArray());
}
#endif

[Fact("BindableLayout Does Not Leak")]
public async Task BindableLayoutDoesNotLeak()
Expand Down Expand Up @@ -760,7 +768,7 @@ await CreateHandlerAndAddToWindow<WindowHandlerStub>(new Window(page), async _ =
Assert.Equal(4, references.Count);
await AssertionExtensions.WaitForGC(references[2], references[3]);
}

#if TEST_FAILS_ON_ANDROID && TESTS_FAILS_ON_WINDOWS && TESTS_FAILS_ON_IOS && TESTS_FAILS_ON_MACCATALYST //For more information, see: https://github.com/dotnet/maui/issues/35985
[Fact("Window Does Not Leak")]
public async Task WindowDoesNotLeak()
{
Expand Down Expand Up @@ -789,6 +797,7 @@ await CreateHandlerAndAddToWindow(window, async () =>

await AssertionExtensions.WaitForGC([.. references]);
}
#endif

[Fact("VisualDiagnosticsOverlay Does Not Leak"
#if IOS || MACCATALYST
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ private void OnMicrosoftUrlClicked(object sender, EventArgs e)
{
_viewModel.Source = new UrlWebViewSource
{
Url = "https://www.microsoft.com"
Url = "https://www.example.com"
};
}
private void OnGithubUrlClicked(object sender, EventArgs e)
{
_viewModel.Source = new UrlWebViewSource
{
Url = "https://github.com/dotnet/maui"
Url = "https://www.example.com"
};
}
private void LoadMultiplePages_Clicked(object sender, EventArgs e)
Expand Down Expand Up @@ -88,8 +88,8 @@ private void LoadMultiplePages_Clicked(object sender, EventArgs e)
<body>
<h1>Welcome to Page 1</h1>
<p>This is the first page.</p>
<p><a href='https://dotnet.microsoft.com'>Go to Page 2 (Microsoft)</a></p>
<p><a href='https://github.com/dotnet/maui'>Go to Page 3 (GitHub)</a></p>
<p><a href='https://www.example.com'>Go to Page 2 (Microsoft)</a></p>
<p><a href='https://www.example.com'>Go to Page 3 (GitHub)</a></p>
</body>
</html>"
};
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue12134.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void OnButtonClicked(object sender, EventArgs e)

private Cookie GetTestCookie()
{
return new Cookie("TestCookie", $"{_guid}", "/", "dotnet.microsoft.com");
return new Cookie("TestCookie", $"{_guid}", "/", "example.com");
}

private WebView GetWebView()
Expand All @@ -85,7 +85,7 @@ private WebView GetWebView()

SetCookieContainer(anotherWebView);
anotherWebView.Navigated += WebViewOnNavigated;
anotherWebView.Source = "https://dotnet.microsoft.com";
anotherWebView.Source = "https://example.com";
return anotherWebView;
}

Expand Down
Loading
Loading