-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Bugzilla39963.cs
51 lines (44 loc) · 1.44 KB
/
Bugzilla39963.cs
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[NUnit.Framework.Category(Core.UITests.UITestCategories.UwpIgnore)]
[NUnit.Framework.Category(Core.UITests.UITestCategories.Bugzilla)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 39963, "iOS WebView has wrong scrolling size when loading local html content with images")]
public class Bugzilla39963 : TestContentPage
{
protected override void Init()
{
var notWorkingHtml = @"<html><body>
<p><img src='test.jpg' /></p>
<p>After starting (not re-entering!) the app in landscape, scroll down to see a black area which is not supposed to be there.</p>
<p>After starting (not re-entering!) the app in portrait, scroll to the right to see a black area which is not supposed to be there.</p>
<p>This only happens when a local image is loaded.</p>
</body></html>";
#pragma warning disable 0219
var workingHtml = @"<html><body>
<p></p>
<p>Without local image, everything works fine.</p>
</body></html>";
#pragma warning restore 0219
WebView webView = new WebView
{
Source = new HtmlWebViewSource()
{
Html = notWorkingHtml
},
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand
};
Content = webView;
}
}
}