Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit ea00c93

Browse files
committed
Ignore Frame
1 parent 4a6beba commit ea00c93

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

Xamarin.Forms.ControlGallery.iOS/Tests/AssertionExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ public static UIColor ColorAtPoint(this UIImage bitmap, int x, int y)
3333
{
3434
var pixel = bitmap.GetPixel(x, y);
3535

36-
// Returned pixel data is B, G, R, A (ARGB little endian)
36+
// Returned pixel data is B, G, R, A (ARGB little endian byte order)
3737
var color = new UIColor(pixel[2] / 255.0f, pixel[1] / 255.0f, pixel[0] / 255.0f, pixel[3] / 255.0f);
3838

3939
return color;
4040
}
4141

42-
public static byte[] GetPixel(this UIImage bitmap, int x, int y)
42+
public static byte[] GetPixel(this UIImage bitmap, int x, int y)
4343
{
4444
var cgImage = bitmap.CGImage.WithColorSpace(CGColorSpace.CreateDeviceRGB());
4545

@@ -54,6 +54,7 @@ public static byte[] GetPixel(this UIImage bitmap, int x, int y)
5454
var dataBytes = new byte[nsData.Length];
5555
System.Runtime.InteropServices.Marshal.Copy(nsData.Bytes, dataBytes, 0, (int)nsData.Length);
5656

57+
// Figure out where the pixel we care about is
5758
var pixelLocation = (cgImage.BytesPerRow * y) + (4 * x);
5859

5960
var pixel = new byte[4]

Xamarin.Forms.ControlGallery.iOS/Tests/CornerRadiusTests.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public void ButtonCornerRadius()
3737
}
3838

3939
[Test, Category("CornerRadius"), Category("Frame")]
40+
[Ignore("Will not pass until https://github.com/xamarin/Xamarin.Forms/issues/9265 is fixed")]
4041
public void FrameCornerRadius()
4142
{
4243
var backgroundColor = Color.CadetBlue;
@@ -46,7 +47,9 @@ public void FrameCornerRadius()
4647
HeightRequest = 100,
4748
WidthRequest = 200,
4849
CornerRadius = 15,
49-
BackgroundColor = backgroundColor
50+
BackgroundColor = backgroundColor,
51+
BorderColor = Color.Brown,
52+
Content = new Label { Text = "Hey" }
5053
};
5154

5255
CheckCornerRadius(frame);
@@ -78,11 +81,14 @@ public void CheckCornerRadius(View view)
7881
{
7982
page.Layout(new Rectangle(0, 0, view.WidthRequest, view.HeightRequest));
8083

81-
uiView.AssertColorAtCenter(view.BackgroundColor.ToUIColor())
82-
.AssertColorAtBottomLeft(EmptyBackground)
83-
.AssertColorAtBottomRight(EmptyBackground)
84-
.AssertColorAtTopLeft(EmptyBackground)
85-
.AssertColorAtTopRight(EmptyBackground);
84+
85+
uiView
86+
.AssertColorAtCenter(view.BackgroundColor.ToUIColor())
87+
.AssertColorAtBottomLeft(EmptyBackground)
88+
.AssertColorAtBottomRight(EmptyBackground)
89+
.AssertColorAtTopLeft(EmptyBackground)
90+
.AssertColorAtTopRight(EmptyBackground);
91+
8692
}
8793
}
8894
}

0 commit comments

Comments
 (0)