summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs
new file mode 100644
index 00000000..fbacce89
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29363, "PushModal followed immediate by PopModal crashes")]
+ public class Bugzilla29363 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var layout = new StackLayout () {HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand};
+
+ Button modal = new Button {
+ Text = "Modal Push Pop Test",
+ Font = Font.SystemFontOfSize (25, FontAttributes.Bold),
+ HorizontalOptions = LayoutOptions.Center
+ };
+ modal.Clicked += async (object sender, EventArgs e) => {
+ var page = new ContentPage () {BackgroundColor = Color.Red};
+
+ await Navigation.PushModalAsync (page);
+
+ await Navigation.PopModalAsync (true);
+ };
+
+ layout.Children.Add (modal);
+ Content = layout;
+ }
+
+#if UITEST
+ [Test]
+ public void PushButton ()
+ {
+ RunningApp.Tap (q => q.Marked ("Modal Push Pop Test"));
+ System.Threading.Thread.Sleep (5);
+ // if it didn't crash, yay
+ }
+#endif
+ }
+}