summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla41842.cs
blob: f5714233bcc64ac5cf247728713f0efa9cd0c789 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif

namespace Xamarin.Forms.Controls
{
	[Preserve(AllMembers = true)]
	[Issue(IssueTracker.Bugzilla, 41842, "Set MasterDetailPage.Detail = New Page() twice will crash the application when set MasterBehavior = MasterBehavior.Split", PlatformAffected.WinRT)]
	public class Bugzilla41842 : TestMasterDetailPage
	{
		protected override void Init()
		{
			MasterBehavior = MasterBehavior.Split;

			Master = new Page() { Title = "Master" };

			Detail = new NavigationPage(new Page());
			Detail = new NavigationPage(new ContentPage { Content = new Label { Text = "Success" } });
		}

#if UITEST
		[Test]
		public void Bugzilla41842Test()
		{
			RunningApp.WaitForElement(q => q.Marked("Success"));
		}
#endif
	}
}