3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("internal/WebView/WebPasswordData")]
13 public class InternalWebPasswordDataTest
15 private const string tag = "NUITEST";
16 private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
21 tlog.Info(tag, "Init() is called!");
27 tlog.Info(tag, "Destroy() is called!");
32 [Description("WebPasswordData constructor.")]
33 [Property("SPEC", "Tizen.NUI.WebPasswordData.WebPasswordData C")]
34 [Property("SPEC_URL", "-")]
35 [Property("CRITERIA", "CONSTR")]
36 [Property("COVPARAM", "")]
37 [Property("AUTHOR", "guowei.wang@samsung.com")]
38 public void WebPasswordDataConstructor()
40 tlog.Debug(tag, $"WebPasswordDataConstructor START");
42 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
44 var testingTarget = new WebPasswordData(webview.SwigCPtr.Handle, false);
45 Assert.IsNotNull(testingTarget, "null handle");
46 Assert.IsInstanceOf<WebPasswordData>(testingTarget, "Should return WebPasswordData instance.");
48 testingTarget.Dispose();
51 tlog.Debug(tag, $"WebPasswordDataConstructor END (OK)");
56 [Description("WebPasswordData FingerprintUsed.")]
57 [Property("SPEC", "Tizen.NUI.WebPasswordData.FingerprintUsed A")]
58 [Property("SPEC_URL", "-")]
59 [Property("CRITERIA", "PRO")]
60 [Property("COVPARAM", "")]
61 [Property("AUTHOR", "guowei.wang@samsung.com")]
62 public void WebPasswordDataFingerprintUsed()
64 tlog.Debug(tag, $"WebPasswordDataFingerprintUsed START");
66 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
68 webview.LoadUrl("http://www.baidu.com");
70 var testingTarget = new WebPasswordData(webview.SwigCPtr.Handle, false);
71 Assert.IsNotNull(testingTarget, "null handle");
72 Assert.IsInstanceOf<WebPasswordData>(testingTarget, "Should return WebPasswordData instance.");
74 var result = testingTarget.FingerprintUsed;
75 tlog.Debug(tag, "FingerprintUsed : " + result);
78 webview.ClearCookies();
80 testingTarget.Dispose();
83 tlog.Debug(tag, $"WebPasswordDataFingerprintUsed END (OK)");