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]