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/WebSecurityOriginList")]
13 public class InternalWebSecurityOriginListTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("WebSecurityOriginList constructor.")]
32 [Property("SPEC", "Tizen.NUI.WebSecurityOriginList.WebSecurityOriginList C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("COVPARAM", "")]
36 [Property("AUTHOR", "guowei.wang@samsung.com")]
37 public void WebSecurityOriginListConstructor()
39 tlog.Debug(tag, $"WebSecurityOriginListConstructor START");
41 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
43 var testingTarget = new WebSecurityOriginList(webview.SwigCPtr.Handle, false);
44 Assert.IsNotNull(testingTarget, "null handle");
45 Assert.IsInstanceOf<WebSecurityOriginList>(testingTarget, "Should return WebSecurityOriginList instance.");
47 testingTarget.Dispose();
50 tlog.Debug(tag, $"WebSecurityOriginListConstructor END (OK)");
55 [Description("WebSecurityOriginList ItemCount.")]
56 [Property("SPEC", "Tizen.NUI.WebSecurityOriginList.ItemCount A")]
57 [Property("SPEC_URL", "-")]
58 [Property("CRITERIA", "PRO")]
59 [Property("COVPARAM", "")]
60 [Property("AUTHOR", "guowei.wang@samsung.com")]
61 public void WebSecurityOriginListItemCount()
63 tlog.Debug(tag, $"WebSecurityOriginListItemCount START");
65 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
67 var testingTarget = new WebSecurityOriginList(webview.SwigCPtr.Handle, false);
68 Assert.IsNotNull(testingTarget, "null handle");
69 Assert.IsInstanceOf<WebSecurityOriginList>(testingTarget, "Should return WebSecurityOriginList instance.");
71 tlog.Debug(tag, "ItemCount : " + testingTarget.ItemCount);
73 testingTarget.Dispose();
76 tlog.Debug(tag, $"WebSecurityOriginListItemCount END (OK)");
81 [Description("WebSecurityOriginList GetItemAtIndex.")]
82 [Property("SPEC", "Tizen.NUI.WebSecurityOriginList.GetItemAtIndex A")]
83 [Property("SPEC_URL", "-")]
84 [Property("CRITERIA", "PRO")]
85 [Property("COVPARAM", "")]
86 [Property("AUTHOR", "guowei.wang@samsung.com")]
87 public void WebSecurityOriginListGetItemAtIndex()
89 tlog.Debug(tag, $"WebSecurityOriginListGetItemAtIndex START");
91 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
93 webview.LoadUrl("http://www.baidu.com");
95 var testingTarget = new WebSecurityOriginList(webview.SwigCPtr.Handle, false);
96 Assert.IsNotNull(testingTarget, "null handle");
97 Assert.IsInstanceOf<WebSecurityOriginList>(testingTarget, "Should return WebSecurityOriginList instance.");
99 var result = testingTarget.GetItemAtIndex(0);
100 tlog.Debug(tag, "GetItemAtIndex : " + result);
102 webview.ClearCache();
103 webview.ClearCookies();
105 testingTarget.Dispose();
108 tlog.Debug(tag, $"WebSecurityOriginListGetItemAtIndex END (OK)");