diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-09-27 07:50:02 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-09-27 14:50:02 +0100 |
commit | 53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398 (patch) | |
tree | 7379dd4d3419a69018e4db910936a8cf146f33f5 /Xamarin.Forms.Controls.Issues | |
parent | c83c830c68bc0da08f330457dc6901f1657b86f5 (diff) | |
download | xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.tar.gz xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.tar.bz2 xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.zip |
Fix potential NRE accessing current application via Page.RealParent (#330)
* Fix potential NRE accessing current application via Page.RealParent
* Update Native Bindings Gallery to use MessagingCenter
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
2 files changed, 42 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40911.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40911.cs new file mode 100644 index 00000000..09035e80 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40911.cs @@ -0,0 +1,41 @@ +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, 40911, "NRE with Facebook Login", PlatformAffected.iOS)] + public class Bugzilla40911 : TestContentPage + { + public StackLayout Layout { get; private set; } + + public const string ReadyToSetUp40911Test = "ReadyToSetUp40911Test"; + + protected override void Init () + { + Layout = new StackLayout(); + + Layout.Children.Add(new Label{Text = "This is an iOS-specific issue. If you're on another platform, you can ignore this." }); + + Content = Layout; + + MessagingCenter.Send(this, ReadyToSetUp40911Test); + } + +#if UITEST && __IOS__ + [Test] + public void CanFinishLoginWithoutNRE () + { + RunningApp.WaitForElement("Start"); + RunningApp.Tap("Start"); + RunningApp.WaitForElement("Login"); + RunningApp.Tap("Login"); + RunningApp.WaitForElement("40911 Success"); + } +#endif + } +}
\ No newline at end of file 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 427a3845..c5f46d54 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 @@ -108,6 +108,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31806.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla40858.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla40824.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla40911.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla40955.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla41078.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla40998.cs" /> |