summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorSamantha Houts <samantha.houts@xamarin.com>2017-02-17 16:11:04 -0800
committerRui Marinho <me@ruimarinho.net>2017-03-10 14:44:19 +0000
commit9a0324d3ed2e699699ae090fa99c30d78ed75930 (patch)
tree62dec74a64b7763180063eda75ce9e456ebd0ef0 /Xamarin.Forms.Controls.Issues
parent64cd1c6545d5e463fc07d688daaa715f5b46f595 (diff)
downloadxamarin-forms-9a0324d3ed2e699699ae090fa99c30d78ed75930.tar.gz
xamarin-forms-9a0324d3ed2e699699ae090fa99c30d78ed75930.tar.bz2
xamarin-forms-9a0324d3ed2e699699ae090fa99c30d78ed75930.zip
Add repro for 52533
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52533.cs64
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 65 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52533.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52533.cs
new file mode 100644
index 00000000..c7c31fcf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52533.cs
@@ -0,0 +1,64 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using System.Linq;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+// Apply the default category of "Issues" to all of the tests in this assembly
+// We use this as a catch-all for tests which haven't been individually categorized
+#if UITEST
+[assembly: NUnit.Framework.Category("Issues")]
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 52533, "System.ArgumentException: NaN is not a valid value for width", PlatformAffected.iOS)]
+ public class Bugzilla52533 : TestContentPage
+ {
+ const string LabelId = "label";
+
+ protected override void Init()
+ {
+ Content = new ListView { ItemTemplate = new DataTemplate(typeof(GridViewCell)), ItemsSource = Enumerable.Range(0, 10) };
+ }
+
+ [Preserve(AllMembers = true)]
+ class GridViewCell : ViewCell
+ {
+
+ public GridViewCell()
+ {
+ var grid = new Grid
+ {
+ // Multiple rows
+ RowDefinitions = {
+ new RowDefinition { Height = new GridLength(20, GridUnitType.Absolute) },
+ new RowDefinition { Height = new GridLength(150, GridUnitType.Absolute) }
+ },
+ // Dynamic width
+ ColumnDefinitions = {
+ new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }
+ }
+ };
+
+ // Infinitely wide + Label
+ var horStack = new StackLayout { Orientation = StackOrientation.Horizontal, Children = { new Label { Text = "If this does not crash, this test has passed.", AutomationId = LabelId } } };
+ grid.Children.Add(horStack, 0, 0);
+
+ View = grid;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla52533Test()
+ {
+ RunningApp.WaitForElement(q => q.Marked(LabelId));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 8d906566..411c09d9 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -229,6 +229,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla44777.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla51503.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla51505.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla52533.cs" />
<Compile Include="$(MSBuildThisFileDirectory)_Template.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1075.cs" />