public void WebContextRegisterMimeOverriddenCallback() { tlog.Debug(tag, $"WebContextRegisterMimeOverriddenCallback 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."); var context = testingTarget.Context; try { context.RegisterMimeOverriddenCallback(MimeWrittenCallback); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextRegisterMimeOverriddenCallback END (OK)"); }
public void WebContextSetTimeZoneOffset() { tlog.Debug(tag, $"WebContextSetTimeZoneOffset 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."); var context = testingTarget.Context; try { context.SetTimeZoneOffset(0.3f, 1.0f); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextSetTimeZoneOffset END (OK)"); }
public void WebContextDeleteWebDatabase() { tlog.Debug(tag, $"WebContextDeleteWebDatabase 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."); var context = testingTarget.Context; try { using (WebSecurityOrigin origin = new WebSecurityOrigin(testingTarget.SwigCPtr.Handle, false)) { context.DeleteWebDatabase(origin); } } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextDeleteWebDatabase END (OK)"); }
public async Task WebContextGetWebStorageUsageForOrigin() { tlog.Debug(tag, $"WebContextGetWebStorageUsageForOrigin 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.LoadUrl("https://www.youtube.com"); await Task.Delay(60000); try { var result = testingTarget.Context.GetWebStorageOrigins(OnSecurityOriginListAcquired); tlog.Error(tag, "result : " + result); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.ClearCache(); testingTarget.ClearCookies(); testingTarget.Dispose(); tlog.Debug(tag, $"GetWebStorageOrigins END (OK)"); }
public void WebContextCacheEnabled() { tlog.Debug(tag, $"WebContextCacheEnabled 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."); var context = testingTarget.Context; tlog.Debug(tag, "CacheEnabled : " + context.CacheEnabled); context.CacheEnabled = true; tlog.Debug(tag, "CacheEnabled : " + context.CacheEnabled); context.CacheEnabled = false; tlog.Debug(tag, "CacheEnabled : " + context.CacheEnabled); testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextCertificateFilePath END (OK)"); }
public void WebContextGetWebDatabaseOrigins() { tlog.Debug(tag, $"WebContextGetWebDatabaseOrigins 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."); var context = testingTarget.Context; try { context.GetWebDatabaseOrigins(OriginListAcquiredCallback); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextGetWebDatabaseOrigins END (OK)"); }
public async Task WebConsoleMessageSource() { tlog.Debug(tag, $"WebConsoleMessageSource 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.ConsoleMessageReceived += OnConsoleMessageReceived; NUIApplication.GetDefaultWindow().Add(testingTarget); testingTarget.LoadUrl("https://www.youtube.com"); await Task.Delay(60000); testingTarget.ClearCache(); testingTarget.ClearCookies(); NUIApplication.GetDefaultWindow().Remove(testingTarget); testingTarget.Dispose(); tlog.Debug(tag, $"WebConsoleMessageSource END (OK)"); }
public void Destroy() { webView.ClearCache(); webView.ClearCookies(); webView.Dispose(); tlog.Info(tag, "Destroy() is called!"); }
public async Task WebCertificateIsFromMainFrame() { tlog.Debug(tag, $"WebCertificateIsFromMainFrame 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.SslCertificateChanged += OnSslCertificateChanged; 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, $"WebCertificateIsFromMainFrame END (OK)"); }
public async Task WebPageLoadErrorUrl() { tlog.Debug(tag, $"WebPageLoadErrorUrl 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.PageLoadError += OnPageLoadError; NUIApplication.GetDefaultWindow().Add(testingTarget); testingTarget.LoadUrl("http://111"); await Task.Delay(10000); testingTarget.ClearCache(); testingTarget.ClearCookies(); NUIApplication.GetDefaultWindow().Remove(testingTarget); testingTarget.Dispose(); tlog.Debug(tag, $"WebPageLoadErrorUrl END (OK)"); }
public async Task WebFormRepostPolicyDecisionMakerReply() { tlog.Debug(tag, $"WebFormRepostPolicyDecisionMakerReply 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.FormRepostPolicyDecided += OnFormRepostPolicyDecided; NUIApplication.GetDefaultWindow().Add(testingTarget); testingTarget.LoadUrl("http://www.163.com"); await Task.Delay(10000); testingTarget.ClearCache(); testingTarget.ClearCookies(); NUIApplication.GetDefaultWindow().Remove(testingTarget); testingTarget.Dispose(); tlog.Debug(tag, $"WebFormRepostPolicyDecisionMakerReply END (OK)"); }
public void WebContextProxyBypassRule() { tlog.Debug(tag, $"WebContextProxyBypassRule 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."); var context = testingTarget.Context; tlog.Debug(tag, "ProxyBypassRule : " + context.ProxyBypassRule); testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextProxyBypassRule END (OK)"); }
public void WebContextDefaultZoomFactor() { tlog.Debug(tag, $"WebContextDefaultZoomFactor 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."); var context = testingTarget.Context; tlog.Debug(tag, "DefaultZoomFactor : " + context.DefaultZoomFactor); context.DefaultZoomFactor = 0.3f; tlog.Debug(tag, "DefaultZoomFactor : " + context.DefaultZoomFactor); testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextDefaultZoomFactor END (OK)"); }
public void WebContextTimeOffset() { tlog.Debug(tag, $"WebContextTimeOffset 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."); var context = testingTarget.Context; tlog.Debug(tag, "TimeOffset : " + context.TimeOffset); context.TimeOffset = 0.3f; tlog.Debug(tag, "TimeOffset : " + context.TimeOffset); testingTarget.ClearCache(); testingTarget.ClearCookies(); context.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"WebContextAppType END (OK)"); }
public void WebPasswordDataFingerprintUsed() { tlog.Debug(tag, $"WebPasswordDataFingerprintUsed START"); using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai")) { webview.LoadUrl("http://www.baidu.com"); var testingTarget = new WebPasswordData(webview.SwigCPtr.Handle, false); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <WebPasswordData>(testingTarget, "Should return WebPasswordData instance."); var result = testingTarget.FingerprintUsed; tlog.Debug(tag, "FingerprintUsed : " + result); webview.ClearCache(); webview.ClearCookies(); testingTarget.Dispose(); } tlog.Debug(tag, $"WebPasswordDataFingerprintUsed END (OK)"); }
public void WebSecurityOriginListGetItemAtIndex() { tlog.Debug(tag, $"WebSecurityOriginListGetItemAtIndex START"); using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai")) { webview.LoadUrl("http://www.baidu.com"); var testingTarget = new WebSecurityOriginList(webview.SwigCPtr.Handle, false); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <WebSecurityOriginList>(testingTarget, "Should return WebSecurityOriginList instance."); var result = testingTarget.GetItemAtIndex(0); tlog.Debug(tag, "GetItemAtIndex : " + result); webview.ClearCache(); webview.ClearCookies(); testingTarget.Dispose(); } tlog.Debug(tag, $"WebSecurityOriginListGetItemAtIndex END (OK)"); }