From 5249fbaa8a9fb98411f53b83a2e4e7e390bb862a Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Tue, 3 Dec 2024 11:39:44 +0100 Subject: [PATCH] chore: Adjust for WinUI --- .../Tests/Windows_UI_Xaml_Controls/Given_Frame.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Frame.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Frame.cs index 863ca59c662d..20af2e901e42 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Frame.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Frame.cs @@ -446,19 +446,23 @@ public async Task When_Exception_In_Page_Ctor() Height = 200 }; +#if HAS_UNO bool navigationFailed = false; SUT.NavigationFailed += (s, e) => navigationFailed = true; +#endif TestServices.WindowHelper.WindowContent = SUT; await TestServices.WindowHelper.WaitForLoaded(SUT); var exception = Assert.ThrowsException(() => SUT.Navigate(typeof(ExceptionInCtorPage))); Assert.AreEqual("Crashed", exception.Message); +#if HAS_UNO if (FeatureConfiguration.Frame.UseWinUIBehavior) { // This is only valid with WinUI Frame behavior Assert.IsFalse(navigationFailed); } +#endif } [TestMethod]