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/WebContextMenuItem")]
13 public class InternalWebContextMenuItemTest
15 private const string tag = "NUITEST";
16 private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
18 internal class MyWebContextMenuItem : WebContextMenuItem
20 public MyWebContextMenuItem(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
23 public void OnReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
25 base.ReleaseSwigCPtr(swigCPtr);
32 tlog.Info(tag, "Init() is called!");
38 tlog.Info(tag, "Destroy() is called!");
43 [Description("WebContextMenuItem constructor.")]
44 [Property("SPEC", "Tizen.NUI.WebContextMenuItem.WebContextMenuItem C")]
45 [Property("SPEC_URL", "-")]
46 [Property("CRITERIA", "CONSTR")]
47 [Property("COVPARAM", "")]
48 [Property("AUTHOR", "guowei.wang@samsung.com")]
49 public void WebContextMenuItemConstructor()
51 tlog.Debug(tag, $"WebContextMenuItemConstructor START");
53 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
55 WebContextMenu menu = new WebContextMenu(webview.SwigCPtr.Handle, false);
57 var testingTarget = new WebContextMenuItem(menu.SwigCPtr.Handle, false);
58 Assert.IsNotNull(testingTarget, "null handle");
59 Assert.IsInstanceOf<WebContextMenuItem>(testingTarget, "Should return WebContextMenuItem instance.");
62 testingTarget.Dispose();
65 tlog.Debug(tag, $"WebContextMenuItemConstructor END (OK)");