using global::System; using NUnit.Framework; using NUnit.Framework.TUnit; using Tizen.NUI.Components; using Tizen.NUI.BaseComponents; using System.Threading.Tasks; namespace Tizen.NUI.Devel.Tests { using tlog = Tizen.Log; [TestFixture] [Description("internal/WebView/WebContextMenu")] public class InternalWebContextMenuTest { private const string tag = "NUITEST"; private static string[] runtimeArgs = { "Tizen.NUI.Devel.Tests", "--enable-dali-window", "--enable-spatial-navigation" }; 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"; private WebContextMenu contextMenu; private Button[] buttons; internal class MyWebContextMenu : WebContextMenu { public MyWebContextMenu(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { } public void OnReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr) { base.ReleaseSwigCPtr(swigCPtr); } } [SetUp] public void Init() { tlog.Info(tag, "Init() is called!"); } [TearDown] public void Destroy() { tlog.Info(tag, "Destroy() is called!"); } [Test] [Category("P1")] [Description("WebContextMenu constructor.")] [Property("SPEC", "Tizen.NUI.WebContextMenu.WebContextMenu C")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("COVPARAM", "")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void WebContextMenuConstructor() { tlog.Debug(tag, $"WebContextMenuConstructor START"); using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai")) { var testingTarget = new WebContextMenu(webview.SwigCPtr.Handle, false); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf(testingTarget, "Should return WebContextMenu instance."); testingTarget.Dispose(); } tlog.Debug(tag, $"WebContextMenuConstructor END (OK)"); } } }