Skip to content

Commit

Permalink
chore: Adjust legacy Frame behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Dec 2, 2024
1 parent 8967b8d commit 147bb55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,11 @@ public async Task When_Exception_In_Page_Ctor()

var exception = Assert.ThrowsException<NotSupportedException>(() => SUT.Navigate(typeof(ExceptionInCtorPage)));
Assert.AreEqual("Crashed", exception.Message);
Assert.IsFalse(navigationFailed);
if (FeatureConfiguration.Frame.UseWinUIBehavior)
{
// This is only valid in WinUI Frame behavior
Assert.IsFalse(navigationFailed);
}
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/Frame/Frame.legacy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private bool InnerNavigate(PageStackEntry entry, NavigationMode mode)
Application.Current.RaiseRecoverableUnhandledException(new InvalidOperationException("Navigation failed", exception));
}

return false;
throw;
}
finally
{
Expand Down

0 comments on commit 147bb55

Please sign in to comment.