3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Threading.Tasks;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("internal/WebView/WebContextMenu")]
14 public class InternalWebContextMenuTest
16 private const string tag = "NUITEST";
17 private static string[] runtimeArgs = { "Tizen.NUI.Devel.Tests", "--enable-dali-window", "--enable-spatial-navigation" };
18 private const string USER_AGENT = "Mozilla/5.0 (SMART-TV; Linux; Tizen 6.0) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/76.0.3809.146 TV Safari/537.36";
20 private WebContextMenu contextMenu;
21 private Button[] buttons;
23 internal class MyWebContextMenu : WebContextMenu
25 public MyWebContextMenu(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
28 public void OnReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
30 base.ReleaseSwigCPtr(swigCPtr);
37 tlog.Info(tag, "Init() is called!");
43 tlog.Info(tag, "Destroy() is called!");
48 [Description("WebContextMenu constructor.")]
49 [Property("SPEC", "Tizen.NUI.WebContextMenu.WebContextMenu C")]
50 [Property("SPEC_URL", "-")]
51 [Property("CRITERIA", "CONSTR")]
52 [Property("COVPARAM", "")]
53 [Property("AUTHOR", "guowei.wang@samsung.com")]
54 public void WebContextMenuConstructor()
56 tlog.Debug(tag, $"WebContextMenuConstructor START");
58 using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
60 var testingTarget = new WebContextMenu(webview.SwigCPtr.Handle, false);
61 Assert.IsNotNull(testingTarget, "null handle");
62 Assert.IsInstanceOf<WebContextMenu>(testingTarget, "Should return WebContextMenu instance.");
64 testingTarget.Dispose();
67 tlog.Debug(tag, $"WebContextMenuConstructor END (OK)");