+++ /dev/null
-using global::System;
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using Tizen.NUI.Components;
-using Tizen.NUI.BaseComponents;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("Internal/Transition/FadeItem")]
- public class InternalFadeItemTest
- {
- private const string tag = "NUITEST";
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("FadeItem constructor.")]
- [Property("SPEC", "Tizen.NUI.FadeItem.FadeItem C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void FadeItemConstructor()
- {
- tlog.Debug(tag, $"FadeItemConstructor START");
-
- using (View view = new View())
- {
- using (TimePeriod timePeriod = new TimePeriod(300))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- var testingTarget = new FadeItem(view, 0.3f, false, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<FadeItem>(testingTarget, "Should be an Instance of FadeItem!");
-
- testingTarget.Dispose();
- }
- }
- }
-
- tlog.Debug(tag, $"FadeItemConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("FadeItem constructor.")]
- [Property("SPEC", "Tizen.NUI.FadeItem.FadeItem C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void FadeItemConstructorWithFadeItem()
- {
- tlog.Debug(tag, $"FadeItemConstructorWithFadeItem START");
-
- using (View view = new View())
- {
- using (TimePeriod timePeriod = new TimePeriod(300))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- using (FadeItem item = new FadeItem(view, 0.3f, false, timePeriod, alphaFunction))
- {
- var testingTarget = new FadeItem(item);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<FadeItem>(testingTarget, "Should be an Instance of FadeItem!");
-
- testingTarget.Dispose();
- // disposed
- testingTarget.Dispose();
- }
- }
- }
- }
-
- tlog.Debug(tag, $"FadeItemConstructorWithFadeItem END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("FadeItem Assign.")]
- [Property("SPEC", "Tizen.NUI.FadeItem.Assign M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void FadeItemAssign()
- {
- tlog.Debug(tag, $"FadeItemAssign START");
-
- using (View view = new View())
- {
- using (TimePeriod timePeriod = new TimePeriod(300))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- using (FadeItem item = new FadeItem(view, 0.3f, false, timePeriod, alphaFunction))
- {
- var testingTarget = item.Assign(item);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<FadeItem>(testingTarget, "Should be an Instance of FadeItem!");
-
- testingTarget.Dispose();
- }
- }
- }
- }
-
- tlog.Debug(tag, $"FadeItemAssign END (OK)");
- }
- }
-}
tlog.Debug(tag, $"WebBackForwardListItemOriginalUrl END (OK)");
}
-
- [Test]
- [Category("P1")]
- [Description("WebBackForwardSubList ItemCount.")]
- [Property("SPEC", "Tizen.NUI.WebBackForwardSubList.ItemCount A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebBackForwardSubListItemCount()
- {
- tlog.Debug(tag, $"WebBackForwardSubListItemCount START");
-
- using (Tizen.NUI.BaseComponents.WebView webView = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
- {
- webView.LoadUrl("https://www.cnblogs.com/softidea/p/5745369.html");
-
- var testingTarget = webView.BackForwardList.GetBackwardItems(0);
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<WebBackForwardSubList>(testingTarget, "Should return WebBackForwardSubList instance.");
-
- tlog.Error(tag, "ItemCount : " + testingTarget.ItemCount);
-
- testingTarget.Dispose();
- }
-
- tlog.Debug(tag, $"WebBackForwardSubListItemCount END (OK)");
- }
}
}
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
using System.Threading.Tasks;
+using System.Collections.Generic;
namespace Tizen.NUI.Devel.Tests
{
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 void OriginListAcquiredCallback (WebSecurityOriginList list) { }
+ private void OriginListAcquiredCallback (IList<WebSecurityOrigin> list) { }
+ private void OnSecurityOriginListAcquired (IList<WebSecurityOrigin> list) { }
private void OnStorageUsageAcquired(ulong usage) { }
- private void PasswordAcquiredCallback (WebPasswordDataList list) { }
+ private void PasswordAcquiredCallback (IList<WebPasswordData> list) { }
private void DownloadCallback (string url) { }
private void UsageAcquiredCallback (ulong usage) { }
- private bool MimeWrittenCallback(string url, string currentMime, string newMime)
+ private bool MimeWrittenCallback(string url, string currentMime, out string newMime)
{
+ newMime = null;
return true;
}
tlog.Debug(tag, $"GetWebStorageOrigins END (OK)");
}
- private void OnSecurityOriginListAcquired(WebSecurityOriginList list)
- {
- WebSecurityOrigin origin = list.GetItemAtIndex(0);
- tlog.Debug(tag, "security origin, Host : " + origin.Host);
- tlog.Debug(tag, "security origin, Protocol : " + origin.Protocol);
- }
-
[Test]
[Category("P1")]
[Description("WebContext DeleteAllWebStorage.")]
+++ /dev/null
-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/WebContextMenuItemList")]
- public class InternalWebContextMenuItemListTest
- {
- private const string tag = "NUITEST";
- private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
- 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";
-
- internal class MyWebContextMenuItemList : WebContextMenuItemList
- {
- public MyWebContextMenuItemList(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("WebContextMenuItemList constructor.")]
- [Property("SPEC", "Tizen.NUI.WebContextMenuItemList.WebContextMenuItemList C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebContextMenuItemListConstructor()
- {
- tlog.Debug(tag, $"WebContextMenuItemListConstructor START");
-
- using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
- {
- WebContextMenu menu = new WebContextMenu(webview.SwigCPtr.Handle, false);
-
- var testingTarget = new WebContextMenuItemList(menu.SwigCPtr.Handle, false);
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<WebContextMenuItemList>(testingTarget, "Should return WebContextMenuItemList instance.");
-
- menu.Dispose();
- testingTarget.Dispose();
- }
-
- tlog.Debug(tag, $"WebContextMenuItemListConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("WebContextMenuItemList ItemCount.")]
- [Property("SPEC", "Tizen.NUI.WebContextMenuItemList.ItemCount A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebContextMenuItemListItemCount()
- {
- tlog.Debug(tag, $"WebContextMenuItemListItemCount START");
-
- var webview = new Tizen.NUI.BaseComponents.WebView(runtimeArgs)
- {
- Size = new Size(500, 200),
- UserAgent = USER_AGENT
- };
- Assert.IsNotNull(webview, "null handle");
- Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(webview, "Should return Tizen.NUI.BaseComponents.WebView instance.");
-
- webview.LoadUrl("http://www.163.com");
-
- var testingTarget = new WebContextMenuItemList(webview.SwigCPtr.Handle, false);
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<WebContextMenuItemList>(testingTarget, "Should return WebContextMenuItemList instance.");
-
- tlog.Error(tag, "ItemCount : " + testingTarget.ItemCount);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WebContextMenuItemListItemCount END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("WebContextMenuItemList GetItemAtIndex.")]
- [Property("SPEC", "Tizen.NUI.WebContextMenuItemList.GetItemAtIndex M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebContextMenuItemListGetItemAtIndex()
- {
- tlog.Debug(tag, $"WebContextMenuItemListGetItemAtIndex START");
-
- using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
- {
- webview.LoadUrl(url);
- WebContextMenu menu = new WebContextMenu(webview.SwigCPtr.Handle, false);
-
- var testingTarget = new WebContextMenuItemList(menu.SwigCPtr.Handle, false);
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<WebContextMenuItemList>(testingTarget, "Should return WebContextMenuItemList instance.");
-
- var result = testingTarget.GetItemAtIndex(0);
- tlog.Error(tag, "WebContextMenuItem : " + result);
-
- menu.Dispose();
- testingTarget.Dispose();
- }
-
- tlog.Debug(tag, $"WebContextMenuItemListGetItemAtIndex END (OK)");
- }
- }
-}
tlog.Debug(tag, $"WebHttpRequestInterceptorReleaseSwigCPtr END (OK)");
}
-
- [Test]
- [Category("P1")]
- [Description("WebHttpRequestInterceptor Url.")]
- [Property("SPEC", "Tizen.NUI.WebHttpRequestInterceptor.Url A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public async Task WebHttpRequestInterceptorUrl()
- {
- tlog.Debug(tag, $"WebHttpRequestInterceptorUrl START");
-
- var testingTarget = new Tizen.NUI.BaseComponents.WebView(runtimeArgs)
- {
- Size = new Size(500, 200),
- UserAgent = USER_AGENT
- };
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return Tizen.NUI.BaseComponents.WebView instance.");
-
- testingTarget.HttpRequestIntercepted += OnHttpRequestIntercepted;
- NUIApplication.GetDefaultWindow().Add(testingTarget);
-
- testingTarget.LoadUrl("http://www.baidu.com");
- await Task.Delay(10000);
-
- testingTarget.ClearCache();
- testingTarget.ClearCookies();
- NUIApplication.GetDefaultWindow().Remove(testingTarget);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WebHttpRequestInterceptorUrl END (OK)");
- }
-
- private void OnHttpRequestIntercepted(object sender, WebViewHttpRequestInterceptedEventArgs e)
- {
- tlog.Debug(tag, $"HttpRequestInterceptor, Url: {e.HttpRequestInterceptor.Url}");
-
- e.HttpRequestInterceptor.Ignore();
- e.HttpRequestInterceptor.SetResponseStatus(911, "Internal error.");
- e.HttpRequestInterceptor.AddResponseHeader("samsung", "webview");
- e.HttpRequestInterceptor.AddResponseBody("Thank you for using!", 20);
- }
}
}
+++ /dev/null
-using global::System;
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using Tizen.NUI.Components;
-using Tizen.NUI.BaseComponents;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("internal/WebView/WebViewHttpRequestInterceptedEventArgs")]
- public class InternalWebViewHttpRequestInterceptedEventArgsTest
- {
- private const string tag = "NUITEST";
- private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("WebViewHttpRequestInterceptedEventArgs constructor.")]
- [Property("SPEC", "Tizen.NUI.WebViewHttpRequestInterceptedEventArgs.WebViewHttpRequestInterceptedEventArgs C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebViewHttpRequestInterceptedEventArgsConstructor()
- {
- tlog.Debug(tag, $"WebViewPageLoadErrorEventArgsConstructor START");
-
- using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
- {
- WebHttpRequestInterceptor interceptor = new WebHttpRequestInterceptor(webview.SwigCPtr.Handle, false);
-
- var testingTarget = new WebViewHttpRequestInterceptedEventArgs(interceptor);
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<WebViewHttpRequestInterceptedEventArgs>(testingTarget, "Should return WebViewHttpRequestInterceptedEventArgs instance.");
-
- interceptor.Dispose();
- }
-
- tlog.Debug(tag, $"WebViewHttpRequestInterceptedEventArgsConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("WebViewHttpRequestInterceptedEventArgs HttpRequestInterceptor.")]
- [Property("SPEC", "Tizen.NUI.WebViewHttpRequestInterceptedEventArgs.HttpRequestInterceptor A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebViewHttpRequestInterceptedEventArgsHttpRequestInterceptor()
- {
- tlog.Debug(tag, $"WebViewPageLoadErrorEventArgsHttpRequestInterceptor START");
-
- using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
- {
- WebHttpRequestInterceptor interceptor = new WebHttpRequestInterceptor(webview.SwigCPtr.Handle, false);
-
- var testingTarget = new WebViewHttpRequestInterceptedEventArgs(interceptor);
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<WebViewHttpRequestInterceptedEventArgs>(testingTarget, "Should return WebViewHttpRequestInterceptedEventArgs instance.");
-
- var result = testingTarget.HttpRequestInterceptor;
- tlog.Debug(tag, "HttpRequestInterceptor : " + result);
-
- interceptor.Dispose();
- }
-
- tlog.Debug(tag, $"WebViewHttpRequestInterceptedEventArgsHttpRequestInterceptor END (OK)");
- }
- }
-}
{
tlog.Debug(tag, $"NUIApplicationConstructorForImeWindow START");
- Size2D windowSize = new Size2D(100, 50);
- Position2D windowPosition = new Position2D(20, 30);
- var testingTarget = new NUIApplication("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition, WindowType.Dialog);
+ var testingTarget = new NUIApplication("", NUIApplication.WindowMode.Opaque, WindowType.Dialog);
Assert.IsNotNull(testingTarget, "Should be not null.");
Assert.IsInstanceOf<NUIApplication>(testingTarget, "Should be an instance of NUIApplication type.");
- windowSize.Dispose();
- windowPosition.Dispose();
testingTarget.Dispose();
tlog.Debug(tag, $"NUIApplicationConstructorForImeWindow END (OK)");
}
using tlog = Tizen.Log;
[TestFixture]
- [Description("public/Images/ImageLoading")]
+ [Description("public/Images/ImageLoader")]
public class PublicImageLoadingTest
{
private const string tag = "NUITEST";
{
tlog.Debug(tag, $"ImageLoadingLoadImageFromFile START");
- var testingTarget = ImageLoading.LoadImageFromFile(image_path);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, size2d);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, size2d);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
// size is null
try
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, null);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, null);
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, size2d, FittingModeType.ScaleToFill);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, size2d, FittingModeType.ScaleToFill);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
// size is null
try
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, null, FittingModeType.ScaleToFill);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, null, FittingModeType.ScaleToFill);
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
// size is null
try
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, null, FittingModeType.ScaleToFill, SamplingModeType.Linear);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, null, FittingModeType.ScaleToFill, SamplingModeType.Linear);
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromFile(image_path, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
+ var testingTarget = ImageLoader.LoadImageFromFile(image_path, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
try
{
- ImageLoading.LoadImageFromFile(image_path, null, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
+ ImageLoader.LoadImageFromFile(image_path, null, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
+ var testingTarget = ImageLoader.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
{
try
{
- ImageLoading.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
+ ImageLoader.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);
}
catch (ArgumentNullException e)
{
try
{
- ImageLoading.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); ;
+ ImageLoader.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); ;
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear);
+ var testingTarget = ImageLoader.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
{
try
{
- ImageLoading.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear);
+ ImageLoader.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear);
}
catch (ArgumentNullException e)
{
try
{
- ImageLoading.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill, SamplingModeType.Linear);
+ ImageLoader.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill, SamplingModeType.Linear);
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill);
+ var testingTarget = ImageLoader.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
{
try
{
- ImageLoading.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill);
+ ImageLoader.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill);
}
catch (ArgumentNullException e)
{
try
{
- ImageLoading.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill);
+ ImageLoader.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill);
}
catch (ArgumentNullException e)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d);
+ var testingTarget = ImageLoader.LoadImageFromBuffer(stream, size2d);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
{
try
{
- ImageLoading.LoadImageFromBuffer(null, size2d);
+ ImageLoader.LoadImageFromBuffer(null, size2d);
}
catch (ArgumentNullException e)
{
try
{
- ImageLoading.LoadImageFromBuffer(stream, null);
+ ImageLoader.LoadImageFromBuffer(stream, null);
}
catch (ArgumentNullException e)
{
var stream = FileToStream(image_path);
- var testingTarget = ImageLoading.LoadImageFromBuffer(stream);
+ var testingTarget = ImageLoader.LoadImageFromBuffer(stream);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
try
{
- ImageLoading.LoadImageFromBuffer(null);
+ ImageLoader.LoadImageFromBuffer(null);
}
catch (ArgumentNullException e)
{
{
tlog.Debug(tag, $"ImageLoadingGetClosestImageSize START");
- var testingTarget = ImageLoading.GetClosestImageSize(file_name);
+ var testingTarget = ImageLoader.GetClosestImageSize(file_name);
Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
Assert.IsInstanceOf<Size2D>(testingTarget, "Should return Size2D instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.GetClosestImageSize(file_name, size2d);
+ var testingTarget = ImageLoader.GetClosestImageSize(file_name, size2d);
Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
Assert.IsInstanceOf<Size2D>(testingTarget, "Should return Size2D instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit);
+ var testingTarget = ImageLoader.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit);
Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
Assert.IsInstanceOf<Size2D>(testingTarget, "Should return Size2D instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit, SamplingModeType.Box);
+ var testingTarget = ImageLoader.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit, SamplingModeType.Box);
Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
Assert.IsInstanceOf<Size2D>(testingTarget, "Should return Size2D instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit, SamplingModeType.Box, true);
+ var testingTarget = ImageLoader.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit, SamplingModeType.Box, true);
Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
Assert.IsInstanceOf<Size2D>(testingTarget, "Should return Size2D instance.");
{
tlog.Debug(tag, $"ImageLoadingGetOriginalImageSize START");
- var testingTarget = ImageLoading.GetOriginalImageSize(file_name);
+ var testingTarget = ImageLoader.GetOriginalImageSize(file_name);
Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
Assert.IsInstanceOf<Size2D>(testingTarget, "Should return Size2D instance.");
tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronously START");
- var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path);
+ var testingTarget = ImageLoader.DownloadImageSynchronously(bmp_path);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path, size2d);
+ var testingTarget = ImageLoader.DownloadImageSynchronously(bmp_path, size2d);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.FitHeight);
+ var testingTarget = ImageLoader.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.FitHeight);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
try
{
- ImageLoading.DownloadImageSynchronously(bmp_path, null, FittingModeType.FitHeight);
+ ImageLoader.DownloadImageSynchronously(bmp_path, null, FittingModeType.FitHeight);
}
catch (ArgumentNullException)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.FitWidth, SamplingModeType.Nearest);
+ var testingTarget = ImageLoader.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.FitWidth, SamplingModeType.Nearest);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
try
{
- ImageLoading.DownloadImageSynchronously(bmp_path, null, FittingModeType.FitHeight, SamplingModeType.Nearest);
+ ImageLoader.DownloadImageSynchronously(bmp_path, null, FittingModeType.FitHeight, SamplingModeType.Nearest);
}
catch (ArgumentNullException)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.Center, SamplingModeType.DontCare, true);
+ var testingTarget = ImageLoader.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.Center, SamplingModeType.DontCare, true);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
try
{
- ImageLoading.DownloadImageSynchronously(bmp_path, null, FittingModeType.FitHeight, SamplingModeType.Nearest, true);
+ ImageLoader.DownloadImageSynchronously(bmp_path, null, FittingModeType.FitHeight, SamplingModeType.Nearest, true);
}
catch (ArgumentNullException)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
- var testingTarget = ImageLoading.DownloadImageSynchronously(new Uri(bmp_path), size2d, FittingModeType.Center);
+ var testingTarget = ImageLoader.DownloadImageSynchronously(new Uri(bmp_path), size2d, FittingModeType.Center);
Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer.");
Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should return PixelBuffer instance.");
try
{
- ImageLoading.DownloadImageSynchronously(new Uri(bmp_path), null, FittingModeType.FitHeight);
+ ImageLoader.DownloadImageSynchronously(new Uri(bmp_path), null, FittingModeType.FitHeight);
}
catch (ArgumentNullException)
{
using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
{
Uri uri = null;
- ImageLoading.DownloadImageSynchronously(uri, size2d, FittingModeType.Center);
+ ImageLoader.DownloadImageSynchronously(uri, size2d, FittingModeType.Center);
}
}
catch (ArgumentNullException)
+++ /dev/null
-using global::System;
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using Tizen.NUI.Components;
-using Tizen.NUI.BaseComponents;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Transition/Fade.cs")]
- public class PublicFadeTest
- {
- private const string tag = "NUITEST";
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("Fade constructor.")]
- [Property("SPEC", "Tizen.NUI.Fade.Fade C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void FadeConstructor()
- {
- tlog.Debug(tag, $"FadeConstructor START");
-
- var testingTarget = new Fade();
- Assert.IsNotNull(testingTarget, "Can't create success object Fade");
- Assert.IsInstanceOf<Fade>(testingTarget, "Should be an instance of Fade type.");
-
- testingTarget.Dispose();
-
- tlog.Debug(tag, $"FadeConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("Fade Opacity.")]
- [Property("SPEC", "Tizen.NUI.Fade.Opacity A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void FadeOpacity()
- {
- tlog.Debug(tag, $"FadeOpacity START");
-
- var testingTarget = new Fade();
- Assert.IsNotNull(testingTarget, "Can't create success object Fade");
- Assert.IsInstanceOf<Fade>(testingTarget, "Should be an instance of Fade type.");
-
- testingTarget.Opacity = 0.3f;
- tlog.Debug(tag, testingTarget.Opacity.ToString());
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"FadeOpacity END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("Fade CreateTransition.")]
- [Property("SPEC", "Tizen.NUI.Fade.CreateTransition M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void FadeCreateTransition()
- {
- tlog.Debug(tag, $"FadeCreateTransition START");
-
- var testingTarget = new Fade();
- Assert.IsNotNull(testingTarget, "Can't create success object Fade");
- Assert.IsInstanceOf<Fade>(testingTarget, "Should be an instance of Fade type.");
-
- using (View view = new View())
- {
- try
- {
- testingTarget.CreateTransition(view, false);
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Falied!");
- }
- }
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"FadeCreateTransition END (OK)");
- }
- }
-}
private Texture LoadStageFillingTexture(string filepath)
{
Size2D dimensions = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height);
- PixelBuffer pb = ImageLoading.LoadImageFromFile(filepath, dimensions, FittingModeType.ScaleToFill);
+ PixelBuffer pb = ImageLoader.LoadImageFromFile(filepath, dimensions, FittingModeType.ScaleToFill);
PixelData pd = PixelBuffer.Convert(pb);
Texture texture = new Texture(TextureType.TEXTURE_2D, pd.GetPixelFormat(), pd.GetWidth(), pd.GetHeight());
using tlog = Tizen.Log;
[TestFixture]
- [Description("internal/WebView/WebPageLoadError")]
- public class InternalWebPageLoadErrorTest
+ [Description("public/WebView/WebPageLoadError")]
+ public class PublicWebPageLoadErrorTest
{
private const string tag = "NUITEST";
private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
using tlog = Tizen.Log;
[TestFixture]
- [Description("internal/WebView/WebView")]
- public class InternalWebViewTest
+ [Description("public/WebView/WebView")]
+ public class PublicWebViewTest
{
private const string tag = "NUITEST";
private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
[Test]
[Category("P1")]
- [Description("WebView HttpRequestIntercepted.")]
- [Property("SPEC", "Tizen.NUI.WebView.HttpRequestIntercepted A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WebViewHttpRequestIntercepted()
- {
- tlog.Debug(tag, $"WebViewHttpRequestIntercepted START");
-
- var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
- Assert.IsNotNull(testingTarget, "null handle");
- Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
-
- testingTarget.HttpRequestIntercepted += OnHttpRequestIntercepte;
- testingTarget.HttpRequestIntercepted -= OnHttpRequestIntercepte;
-
- testingTarget.ClearCache();
- testingTarget.ClearCookies();
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WebViewHttpRequestIntercepted END (OK)");
- }
-
- [Test]
- [Category("P1")]
[Description("WebView SslCertificateChanged.")]
[Property("SPEC", "Tizen.NUI.WebView.SslCertificateChanged A")]
[Property("SPEC_URL", "-")]
private void OnFrameRender(object sender, EventArgs e) { }
private void OnResponsePolicyDecide(object sender, WebViewResponsePolicyDecidedEventArgs e) { }
private void OnCertificateConfirme(object sender, WebViewCertificateReceivedEventArgs e) { }
- private void OnHttpRequestIntercepte(object sender, WebViewHttpRequestInterceptedEventArgs e) { }
private void OnSslCertificateChange(object sender, WebViewCertificateReceivedEventArgs e) { }
private void OnHttpAuthRequeste(object sender, WebViewHttpAuthRequestedEventArgs e) { }
private void OnConsoleMessageReceive(object sender, WebViewConsoleMessageReceivedEventArgs e) { }
using tlog = Tizen.Log;
[TestFixture]
- [Description("internal/WebView/WebViewPageLoadErrorEventArgs")]
- public class InternalWebViewPageLoadErrorEventArgsTest
+ [Description("public/WebView/WebViewPageLoadErrorEventArgs")]
+ public class PublicWebViewPageLoadErrorEventArgsTest
{
private const string tag = "NUITEST";
private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
using tlog = Tizen.Log;
[TestFixture]
- [Description("internal/WebView/WebViewPageLoadEventArgs")]
- public class InternalWebViewPageLoadEventArgsTest
+ [Description("public/WebView/WebViewPageLoadEventArgs")]
+ public class PublicWebViewPageLoadEventArgsTest
{
private const string tag = "NUITEST";
private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
[Test]
[Category("P1")]
- [Description("Window SetPositionSizeWithOrientation")]
- [Property("SPEC", "Tizen.NUI.Window.SetPositionSizeWithOrientation M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void WindowSetPositionSizeWithOrientation()
- {
- tlog.Debug(tag, $"WindowSetPositionSizeWithOrientation START");
-
- try
- {
- using (Rectangle positionSize = new Rectangle(1, 2, 3, 4))
- {
- win.SetPositionSizeWithOrientation(positionSize, Window.WindowOrientation.Landscape);
- }
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
-
- tlog.Debug(tag, $"WindowSetPositionSizeWithOrientation END (OK)");
- }
-
- [Test]
- [Category("P1")]
[Description("Window GetNativeId")]
[Property("SPEC", "Tizen.NUI.Window.GetNativeId M")]
[Property("SPEC_URL", "-")]
tlog.Debug(tag, $"ConditionChangedTest2 START");
BindingCondition mb = new BindingCondition();
Assert.IsNotNull(mb, "Should not be null");
- var b = new Binding.Binding();
var ac = (Action<BindableObject, bool, bool>)((bindable, b, c) => throw new Exception());
mb.ConditionChanged = ac;