summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
new file mode 100644
index 00000000..44746217
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
@@ -0,0 +1,50 @@
+´╗┐using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.Android;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2809, "Secondary ToolbarItems cause app to hang during PushAsync", PlatformAffected.iOS)]
+ public class Issue2809: TestContentPage
+ {
+ protected override void Init ()
+ {
+ ToolbarItems.Add(new ToolbarItem("Item 1", string.Empty,
+ DummyAction, ToolbarItemOrder.Secondary));
+
+ ToolbarItems.Add(new ToolbarItem("Item 2", string.Empty,
+ DummyAction, ToolbarItemOrder.Secondary));
+ }
+
+ public void DummyAction()
+ {
+ }
+
+#if UITEST
+ [Test]
+ public void TestPageDoesntCrash ()
+ {
+ ShouldShowMenu();
+ RunningApp.Tap (c => c.Marked ("Item 1"));
+ RunningApp.Screenshot ("Didn't crash");
+ }
+
+ void ShouldShowMenu ()
+ {
+ if (RunningApp is AndroidApp) {
+ //show secondary menu
+ RunningApp.Tap (c => c.Class ("android.support.v7.widget.ActionMenuPresenter$OverflowMenuButton"));
+ }
+ }
+
+#endif
+
+ }
+}
+