3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Threading.Tasks;
7 using System.Collections.Generic;
9 namespace Tizen.NUI.Devel.Tests
11 using tlog = Tizen.Log;
14 [Description("internal/WebView/WebContext")]
15 public class InternalWebContextTest
17 private const string tag = "NUITEST";
18 private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
19 private static string[] runtimeArgs = { "Tizen.NUI.Devel.Tests", "--enable-dali-window", "--enable-spatial-navigation" };
20 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";
22 private void OriginListAcquiredCallback (IList<WebSecurityOrigin> list) { }
23 private void OnSecurityOriginListAcquired (IList<WebSecurityOrigin> list) { }
24 private void OnStorageUsageAcquired(ulong usage) { }
25 private void PasswordAcquiredCallback (IList<WebPasswordData> list) { }
26 private void DownloadCallback (string url) { }
27 private void UsageAcquiredCallback (ulong usage) { }
28 private bool MimeWrittenCallback(string url, string currentMime, out string newMime)
37 tlog.Info(tag, "Init() is called!");
43 tlog.Info(tag, "Destroy() is called!");
48 [Description("WebContext ProxyUrl.")]
49 [Property("SPEC", "Tizen.NUI.WebContext.ProxyUrl A")]
50 [Property("SPEC_URL", "-")]
51 [Property("CRITERIA", "PRW")]
52 [Property("COVPARAM", "")]
53 [Property("AUTHOR", "guowei.wang@samsung.com")]
54 public void WebContextProxyUrl()
56 tlog.Debug(tag, $"WebContextProxyUrl START");
58 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
59 Assert.IsNotNull(testingTarget, "null handle");
60 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
62 var context = testingTarget.Context;
63 tlog.Debug(tag, "ProxyUrl : " + context.ProxyUrl);
65 context.ProxyUrl = "http://www.baidu.com";
66 tlog.Debug(tag, "ProxyUrl : " + context.ProxyUrl);
68 testingTarget.ClearCache();
69 testingTarget.ClearCookies();
72 testingTarget.Dispose();
73 tlog.Debug(tag, $"WebContextProxyUrl END (OK)");
78 [Description("WebContext CertificateFilePath.")]
79 [Property("SPEC", "Tizen.NUI.WebContext.CertificateFilePath A")]
80 [Property("SPEC_URL", "-")]
81 [Property("CRITERIA", "PRW")]
82 [Property("COVPARAM", "")]
83 [Property("AUTHOR", "guowei.wang@samsung.com")]
84 public void WebContextCertificateFilePath()
86 tlog.Debug(tag, $"WebContextCertificateFilePath START");
88 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
89 Assert.IsNotNull(testingTarget, "null handle");
90 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
92 var context = testingTarget.Context;
93 tlog.Debug(tag, "CertificateFilePath : " + context.CertificateFilePath);
95 context.CertificateFilePath = url;
96 tlog.Debug(tag, "CertificateFilePath : " + context.CertificateFilePath);
98 testingTarget.ClearCache();
99 testingTarget.ClearCookies();
102 testingTarget.Dispose();
103 tlog.Debug(tag, $"WebContextCertificateFilePath END (OK)");
108 [Description("WebContext CacheEnabled.")]
109 [Property("SPEC", "Tizen.NUI.WebContext.CacheEnabled A")]
110 [Property("SPEC_URL", "-")]
111 [Property("CRITERIA", "PRW")]
112 [Property("COVPARAM", "")]
113 [Property("AUTHOR", "guowei.wang@samsung.com")]
114 public void WebContextCacheEnabled()
116 tlog.Debug(tag, $"WebContextCacheEnabled START");
118 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
119 Assert.IsNotNull(testingTarget, "null handle");
120 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
122 var context = testingTarget.Context;
123 tlog.Debug(tag, "CacheEnabled : " + context.CacheEnabled);
125 context.CacheEnabled = true;
126 tlog.Debug(tag, "CacheEnabled : " + context.CacheEnabled);
128 context.CacheEnabled = false;
129 tlog.Debug(tag, "CacheEnabled : " + context.CacheEnabled);
131 testingTarget.ClearCache();
132 testingTarget.ClearCookies();
135 testingTarget.Dispose();
136 tlog.Debug(tag, $"WebContextCertificateFilePath END (OK)");
141 [Description("WebContext AppId.")]
142 [Property("SPEC", "Tizen.NUI.WebContext.AppId A")]
143 [Property("SPEC_URL", "-")]
144 [Property("CRITERIA", "PRW")]
145 [Property("COVPARAM", "")]
146 [Property("AUTHOR", "guowei.wang@samsung.com")]
147 public void WebContextAppId()
149 tlog.Debug(tag, $"WebContextAppId START");
151 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
152 Assert.IsNotNull(testingTarget, "null handle");
153 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
155 var context = testingTarget.Context;
156 tlog.Debug(tag, "AppId : " + context.AppId);
158 context.AppId = "WebContextAppId";
159 tlog.Debug(tag, "AppId : " + context.AppId);
161 testingTarget.ClearCache();
162 testingTarget.ClearCookies();
165 testingTarget.Dispose();
166 tlog.Debug(tag, $"WebContextAppId END (OK)");
171 [Description("WebContext AppVersion.")]
172 [Property("SPEC", "Tizen.NUI.WebContext.AppVersion A")]
173 [Property("SPEC_URL", "-")]
174 [Property("CRITERIA", "PRW")]
175 [Property("COVPARAM", "")]
176 [Property("AUTHOR", "guowei.wang@samsung.com")]
177 public void WebContextAppVersion()
179 tlog.Debug(tag, $"WebContextAppVersion START");
181 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
182 Assert.IsNotNull(testingTarget, "null handle");
183 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
185 var context = testingTarget.Context;
186 tlog.Debug(tag, "AppVersion : " + context.AppVersion);
188 context.AppVersion = "1.0";
189 tlog.Debug(tag, "AppVersion : " + context.AppVersion);
191 testingTarget.ClearCache();
192 testingTarget.ClearCookies();
195 testingTarget.Dispose();
196 tlog.Debug(tag, $"WebContextAppVersion END (OK)");
201 [Description("WebContext AppType.")]
202 [Property("SPEC", "Tizen.NUI.WebContext.AppType A")]
203 [Property("SPEC_URL", "-")]
204 [Property("CRITERIA", "PRW")]
205 [Property("COVPARAM", "")]
206 [Property("AUTHOR", "guowei.wang@samsung.com")]
207 public void WebContextAppType()
209 tlog.Debug(tag, $"WebContextAppType START");
211 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
212 Assert.IsNotNull(testingTarget, "null handle");
213 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
215 var context = testingTarget.Context;
216 tlog.Debug(tag, "AppType : " + context.AppType);
218 context.AppType = WebContext.ApplicationType.WebBrowser;
219 tlog.Debug(tag, "AppType : " + context.AppType);
221 testingTarget.ClearCache();
222 testingTarget.ClearCookies();
225 testingTarget.Dispose();
226 tlog.Debug(tag, $"WebContextAppType END (OK)");
231 [Description("WebContext TimeOffset.")]
232 [Property("SPEC", "Tizen.NUI.WebContext.TimeOffset A")]
233 [Property("SPEC_URL", "-")]
234 [Property("CRITERIA", "PRW")]
235 [Property("COVPARAM", "")]
236 [Property("AUTHOR", "guowei.wang@samsung.com")]
237 public void WebContextTimeOffset()
239 tlog.Debug(tag, $"WebContextTimeOffset START");
241 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
242 Assert.IsNotNull(testingTarget, "null handle");
243 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
245 var context = testingTarget.Context;
246 tlog.Debug(tag, "TimeOffset : " + context.TimeOffset);
248 context.TimeOffset = 0.3f;
249 tlog.Debug(tag, "TimeOffset : " + context.TimeOffset);
251 testingTarget.ClearCache();
252 testingTarget.ClearCookies();
255 testingTarget.Dispose();
256 tlog.Debug(tag, $"WebContextAppType END (OK)");
261 [Description("WebContext DefaultZoomFactor.")]
262 [Property("SPEC", "Tizen.NUI.WebContext.DefaultZoomFactor A")]
263 [Property("SPEC_URL", "-")]
264 [Property("CRITERIA", "PRW")]
265 [Property("COVPARAM", "")]
266 [Property("AUTHOR", "guowei.wang@samsung.com")]
267 public void WebContextDefaultZoomFactor()
269 tlog.Debug(tag, $"WebContextDefaultZoomFactor START");
271 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
272 Assert.IsNotNull(testingTarget, "null handle");
273 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
275 var context = testingTarget.Context;
276 tlog.Debug(tag, "DefaultZoomFactor : " + context.DefaultZoomFactor);
278 context.DefaultZoomFactor = 0.3f;
279 tlog.Debug(tag, "DefaultZoomFactor : " + context.DefaultZoomFactor);
281 testingTarget.ClearCache();
282 testingTarget.ClearCookies();
285 testingTarget.Dispose();
286 tlog.Debug(tag, $"WebContextDefaultZoomFactor END (OK)");
291 [Description("WebContext ContextProxy.")]
292 [Property("SPEC", "Tizen.NUI.WebContext.ContextProxy A")]
293 [Property("SPEC_URL", "-")]
294 [Property("CRITERIA", "PRO")]
295 [Property("COVPARAM", "")]
296 [Property("AUTHOR", "guowei.wang@samsung.com")]
297 public void WebContextContextProxy()
299 tlog.Debug(tag, $"WebContextContextProxy START");
301 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
302 Assert.IsNotNull(testingTarget, "null handle");
303 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
305 var context = testingTarget.Context;
306 tlog.Debug(tag, "ContextProxy : " + context.ContextProxy);
308 testingTarget.ClearCache();
309 testingTarget.ClearCookies();
312 testingTarget.Dispose();
313 tlog.Debug(tag, $"WebContextContextProxy END (OK)");
318 [Description("WebContext ProxyBypassRule.")]
319 [Property("SPEC", "Tizen.NUI.WebContext.ProxyBypassRule A")]
320 [Property("SPEC_URL", "-")]
321 [Property("CRITERIA", "PRO")]
322 [Property("COVPARAM", "")]
323 [Property("AUTHOR", "guowei.wang@samsung.com")]
324 public void WebContextProxyBypassRule()
326 tlog.Debug(tag, $"WebContextProxyBypassRule START");
328 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
329 Assert.IsNotNull(testingTarget, "null handle");
330 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
332 var context = testingTarget.Context;
333 tlog.Debug(tag, "ProxyBypassRule : " + context.ProxyBypassRule);
335 testingTarget.ClearCache();
336 testingTarget.ClearCookies();
339 testingTarget.Dispose();
340 tlog.Debug(tag, $"WebContextProxyBypassRule END (OK)");
345 [Description("WebContext SetDefaultProxyAuth.")]
346 [Property("SPEC", "Tizen.NUI.WebContext.SetDefaultProxyAuth M")]
347 [Property("SPEC_URL", "-")]
348 [Property("CRITERIA", "MR")]
349 [Property("COVPARAM", "")]
350 [Property("AUTHOR", "guowei.wang@samsung.com")]
351 public void WebContextSetDefaultProxyAuth()
353 tlog.Debug(tag, $"WebContextSetDefaultProxyAuth START");
355 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
356 Assert.IsNotNull(testingTarget, "null handle");
357 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
359 var context = testingTarget.Context;
363 context.SetDefaultProxyAuth("tizen", "samsung");
367 tlog.Debug(tag, e.Message.ToString());
368 Assert.Fail("Caught Exception : Failed!");
371 testingTarget.ClearCache();
372 testingTarget.ClearCookies();
375 testingTarget.Dispose();
376 tlog.Debug(tag, $"WebContextSetDefaultProxyAuth END (OK)");
381 [Description("WebContext DeleteAllWebDatabase.")]
382 [Property("SPEC", "Tizen.NUI.WebContext.DeleteAllWebDatabase M")]
383 [Property("SPEC_URL", "-")]
384 [Property("CRITERIA", "MR")]
385 [Property("COVPARAM", "")]
386 [Property("AUTHOR", "guowei.wang@samsung.com")]
387 public void WebContextDeleteAllWebDatabase()
389 tlog.Debug(tag, $"WebContextDeleteAllWebDatabase START");
391 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
392 Assert.IsNotNull(testingTarget, "null handle");
393 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
395 var context = testingTarget.Context;
399 context.DeleteAllWebDatabase();
403 tlog.Debug(tag, e.Message.ToString());
404 Assert.Fail("Caught Exception : Failed!");
407 testingTarget.ClearCache();
408 testingTarget.ClearCookies();
411 testingTarget.Dispose();
412 tlog.Debug(tag, $"WebContextDeleteAllWebDatabase END (OK)");
417 [Description("WebContext GetWebDatabaseOrigins.")]
418 [Property("SPEC", "Tizen.NUI.WebContext.GetWebDatabaseOrigins M")]
419 [Property("SPEC_URL", "-")]
420 [Property("CRITERIA", "MR")]
421 [Property("COVPARAM", "")]
422 [Property("AUTHOR", "guowei.wang@samsung.com")]
423 public void WebContextGetWebDatabaseOrigins()
425 tlog.Debug(tag, $"WebContextGetWebDatabaseOrigins START");
427 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
428 Assert.IsNotNull(testingTarget, "null handle");
429 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
431 var context = testingTarget.Context;
435 context.GetWebDatabaseOrigins(OriginListAcquiredCallback);
439 tlog.Debug(tag, e.Message.ToString());
440 Assert.Fail("Caught Exception : Failed!");
443 testingTarget.ClearCache();
444 testingTarget.ClearCookies();
447 testingTarget.Dispose();
448 tlog.Debug(tag, $"WebContextGetWebDatabaseOrigins END (OK)");
453 [Description("WebContext DeleteWebDatabase.")]
454 [Property("SPEC", "Tizen.NUI.WebContext.DeleteWebDatabase M")]
455 [Property("SPEC_URL", "-")]
456 [Property("CRITERIA", "MR")]
457 [Property("COVPARAM", "")]
458 [Property("AUTHOR", "guowei.wang@samsung.com")]
459 public void WebContextDeleteWebDatabase()
461 tlog.Debug(tag, $"WebContextDeleteWebDatabase START");
463 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
464 Assert.IsNotNull(testingTarget, "null handle");
465 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
467 var context = testingTarget.Context;
471 using (WebSecurityOrigin origin = new WebSecurityOrigin(testingTarget.SwigCPtr.Handle, false))
473 context.DeleteWebDatabase(origin);
478 tlog.Debug(tag, e.Message.ToString());
479 Assert.Fail("Caught Exception : Failed!");
482 testingTarget.ClearCache();
483 testingTarget.ClearCookies();
486 testingTarget.Dispose();
487 tlog.Debug(tag, $"WebContextDeleteWebDatabase END (OK)");
492 [Description("WebContext GetWebStorageOrigins.")]
493 [Property("SPEC", "Tizen.NUI.WebContext.GetWebStorageUsageForOrigin M")]
494 [Property("SPEC_URL", "-")]
495 [Property("CRITERIA", "MR")]
496 [Property("COVPARAM", "")]
497 [Property("AUTHOR", "guowei.wang@samsung.com")]
498 public async Task WebContextGetWebStorageUsageForOrigin()
500 tlog.Debug(tag, $"WebContextGetWebStorageUsageForOrigin START");
502 var testingTarget = new Tizen.NUI.BaseComponents.WebView(runtimeArgs)
504 Size = new Size(500, 200),
505 UserAgent = USER_AGENT
507 Assert.IsNotNull(testingTarget, "null handle");
508 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return Tizen.NUI.BaseComponents.WebView instance.");
510 testingTarget.LoadUrl("https://www.youtube.com");
511 await Task.Delay(60000);
515 var result = testingTarget.Context.GetWebStorageOrigins(OnSecurityOriginListAcquired);
516 tlog.Error(tag, "result : " + result);
520 tlog.Debug(tag, e.Message.ToString());
521 Assert.Fail("Caught Exception : Failed!");
524 testingTarget.ClearCache();
525 testingTarget.ClearCookies();
527 testingTarget.Dispose();
528 tlog.Debug(tag, $"GetWebStorageOrigins END (OK)");
533 [Description("WebContext DeleteAllWebStorage.")]
534 [Property("SPEC", "Tizen.NUI.WebContext.DeleteAllWebStorage M")]
535 [Property("SPEC_URL", "-")]
536 [Property("CRITERIA", "MR")]
537 [Property("COVPARAM", "")]
538 [Property("AUTHOR", "guowei.wang@samsung.com")]
539 public void WebContextDeleteAllWebStorage()
541 tlog.Debug(tag, $"WebContextDeleteAllWebStorage START");
543 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
544 Assert.IsNotNull(testingTarget, "null handle");
545 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
547 var context = testingTarget.Context;
551 context.DeleteAllWebStorage();
555 tlog.Debug(tag, e.Message.ToString());
556 Assert.Fail("Caught Exception : Failed!");
559 testingTarget.ClearCache();
560 testingTarget.ClearCookies();
563 testingTarget.Dispose();
564 tlog.Debug(tag, $"WebContextDeleteAllWebStorage END (OK)");
569 [Description("WebContext DeleteLocalFileSystem.")]
570 [Property("SPEC", "Tizen.NUI.WebContext.DeleteLocalFileSystem M")]
571 [Property("SPEC_URL", "-")]
572 [Property("CRITERIA", "MR")]
573 [Property("COVPARAM", "")]
574 [Property("AUTHOR", "guowei.wang@samsung.com")]
575 public void WebContextDeleteLocalFileSystem()
577 tlog.Debug(tag, $"WebContextDeleteLocalFileSystem START");
579 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
580 Assert.IsNotNull(testingTarget, "null handle");
581 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
583 var context = testingTarget.Context;
587 context.DeleteLocalFileSystem();
591 tlog.Debug(tag, e.Message.ToString());
592 Assert.Fail("Caught Exception : Failed!");
595 testingTarget.ClearCache();
596 testingTarget.ClearCookies();
599 testingTarget.Dispose();
600 tlog.Debug(tag, $"WebContextDeleteLocalFileSystem END (OK)");
605 [Description("WebContext GetFormPasswordList.")]
606 [Property("SPEC", "Tizen.NUI.WebContext.GetFormPasswordList M")]
607 [Property("SPEC_URL", "-")]
608 [Property("CRITERIA", "MR")]
609 [Property("COVPARAM", "")]
610 [Property("AUTHOR", "guowei.wang@samsung.com")]
611 public void WebContextGetFormPasswordList()
613 tlog.Debug(tag, $"WebContextGetFormPasswordList START");
615 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
616 Assert.IsNotNull(testingTarget, "null handle");
617 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
619 var context = testingTarget.Context;
623 context.GetFormPasswordList(PasswordAcquiredCallback);
627 tlog.Debug(tag, e.Message.ToString());
628 Assert.Fail("Caught Exception : Failed!");
631 testingTarget.ClearCache();
632 testingTarget.ClearCookies();
635 testingTarget.Dispose();
636 tlog.Debug(tag, $"WebContextGetFormPasswordList END (OK)");
641 [Description("WebContext RegisterDownloadStartedCallback.")]
642 [Property("SPEC", "Tizen.NUI.WebContext.RegisterDownloadStartedCallback M")]
643 [Property("SPEC_URL", "-")]
644 [Property("CRITERIA", "MR")]
645 [Property("COVPARAM", "")]
646 [Property("AUTHOR", "guowei.wang@samsung.com")]
647 public void WebContextRegisterDownloadStartedCallback()
649 tlog.Debug(tag, $"WebContextRegisterDownloadStartedCallback START");
651 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
652 Assert.IsNotNull(testingTarget, "null handle");
653 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
655 var context = testingTarget.Context;
659 context.RegisterDownloadStartedCallback(DownloadCallback);
663 tlog.Debug(tag, e.Message.ToString());
664 Assert.Fail("Caught Exception : Failed!");
667 testingTarget.ClearCache();
668 testingTarget.ClearCookies();
671 testingTarget.Dispose();
672 tlog.Debug(tag, $"WebContextRegisterDownloadStartedCallback END (OK)");
677 [Description("WebContext RegisterMimeOverriddenCallback.")]
678 [Property("SPEC", "Tizen.NUI.WebContext.RegisterMimeOverriddenCallback M")]
679 [Property("SPEC_URL", "-")]
680 [Property("CRITERIA", "MR")]
681 [Property("COVPARAM", "")]
682 [Property("AUTHOR", "guowei.wang@samsung.com")]
683 public void WebContextRegisterMimeOverriddenCallback()
685 tlog.Debug(tag, $"WebContextRegisterMimeOverriddenCallback START");
687 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
688 Assert.IsNotNull(testingTarget, "null handle");
689 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
691 var context = testingTarget.Context;
695 context.RegisterMimeOverriddenCallback(MimeWrittenCallback);
699 tlog.Debug(tag, e.Message.ToString());
700 Assert.Fail("Caught Exception : Failed!");
703 testingTarget.ClearCache();
704 testingTarget.ClearCookies();
707 testingTarget.Dispose();
708 tlog.Debug(tag, $"WebContextRegisterMimeOverriddenCallback END (OK)");
713 [Description("WebContext SetTimeZoneOffset.")]
714 [Property("SPEC", "Tizen.NUI.WebContext.SetTimeZoneOffset M")]
715 [Property("SPEC_URL", "-")]
716 [Property("CRITERIA", "MR")]
717 [Property("COVPARAM", "")]
718 [Property("AUTHOR", "guowei.wang@samsung.com")]
719 public void WebContextSetTimeZoneOffset()
721 tlog.Debug(tag, $"WebContextSetTimeZoneOffset START");
723 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
724 Assert.IsNotNull(testingTarget, "null handle");
725 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
727 var context = testingTarget.Context;
731 context.SetTimeZoneOffset(0.3f, 1.0f);
735 tlog.Debug(tag, e.Message.ToString());
736 Assert.Fail("Caught Exception : Failed!");
739 testingTarget.ClearCache();
740 testingTarget.ClearCookies();
743 testingTarget.Dispose();
744 tlog.Debug(tag, $"WebContextSetTimeZoneOffset END (OK)");
749 [Description("WebContext SetContextTimeZoneOffset.")]
750 [Property("SPEC", "Tizen.NUI.WebContext.SetContextTimeZoneOffset M")]
751 [Property("SPEC_URL", "-")]
752 [Property("CRITERIA", "MR")]
753 [Property("COVPARAM", "")]
754 [Property("AUTHOR", "guowei.wang@samsung.com")]
755 public void WebContextSetContextTimeZoneOffset()
757 tlog.Debug(tag, $"WebContextSetContextTimeZoneOffset START");
759 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
760 Assert.IsNotNull(testingTarget, "null handle");
761 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
763 var context = testingTarget.Context;
767 context.SetContextTimeZoneOffset(0.3f, 1.0f);
771 tlog.Debug(tag, e.Message.ToString());
772 Assert.Fail("Caught Exception : Failed!");
775 testingTarget.ClearCache();
776 testingTarget.ClearCookies();
779 testingTarget.Dispose();
780 tlog.Debug(tag, $"WebContextSetContextTimeZoneOffset END (OK)");
785 [Description("WebContext DeleteAllApplicationCache.")]
786 [Property("SPEC", "Tizen.NUI.WebContext.DeleteAllApplicationCache M")]
787 [Property("SPEC_URL", "-")]
788 [Property("CRITERIA", "MR")]
789 [Property("COVPARAM", "")]
790 [Property("AUTHOR", "guowei.wang@samsung.com")]
791 public void WebContextDeleteAllApplicationCache()
793 tlog.Debug(tag, $"WebContextDeleteAllApplicationCache START");
795 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
796 Assert.IsNotNull(testingTarget, "null handle");
797 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
799 var context = testingTarget.Context;
803 context.DeleteAllApplicationCache();
807 tlog.Debug(tag, e.Message.ToString());
808 Assert.Fail("Caught Exception : Failed!");
811 testingTarget.ClearCache();
812 testingTarget.ClearCookies();
815 testingTarget.Dispose();
816 tlog.Debug(tag, $"WebContextDeleteAllApplicationCache END (OK)");
821 [Description("WebContext DeleteAllWebIndexedDatabase.")]
822 [Property("SPEC", "Tizen.NUI.WebContext.DeleteAllWebIndexedDatabase M")]
823 [Property("SPEC_URL", "-")]
824 [Property("CRITERIA", "MR")]
825 [Property("COVPARAM", "")]
826 [Property("AUTHOR", "guowei.wang@samsung.com")]
827 public void WebContextDeleteAllWebIndexedDatabase()
829 tlog.Debug(tag, $"WebContextDeleteAllWebIndexedDatabase START");
831 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
832 Assert.IsNotNull(testingTarget, "null handle");
833 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
835 var context = testingTarget.Context;
839 context.DeleteAllWebIndexedDatabase();
843 tlog.Debug(tag, e.Message.ToString());
844 Assert.Fail("Caught Exception : Failed!");
847 testingTarget.ClearCache();
848 testingTarget.ClearCookies();
851 testingTarget.Dispose();
852 tlog.Debug(tag, $"WebContextDeleteAllWebIndexedDatabase END (OK)");
857 [Description("WebContext DeleteAllFormPasswordData.")]
858 [Property("SPEC", "Tizen.NUI.WebContext.DeleteAllFormPasswordData M")]
859 [Property("SPEC_URL", "-")]
860 [Property("CRITERIA", "MR")]
861 [Property("COVPARAM", "")]
862 [Property("AUTHOR", "guowei.wang@samsung.com")]
863 public void WebContextDeleteAllFormPasswordData()
865 tlog.Debug(tag, $"WebContextDeleteAllFormPasswordData START");
867 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
868 Assert.IsNotNull(testingTarget, "null handle");
869 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
871 var context = testingTarget.Context;
875 context.DeleteAllFormPasswordData();
879 tlog.Debug(tag, e.Message.ToString());
880 Assert.Fail("Caught Exception : Failed!");
883 testingTarget.ClearCache();
884 testingTarget.ClearCookies();
887 testingTarget.Dispose();
888 tlog.Debug(tag, $"WebContextDeleteAllFormPasswordData END (OK)");
893 [Description("WebContext DeleteAllFormCandidateData.")]
894 [Property("SPEC", "Tizen.NUI.WebContext.DeleteAllFormCandidateData M")]
895 [Property("SPEC_URL", "-")]
896 [Property("CRITERIA", "MR")]
897 [Property("COVPARAM", "")]
898 [Property("AUTHOR", "guowei.wang@samsung.com")]
899 public void WebContextDeleteAllFormCandidateData()
901 tlog.Debug(tag, $"WebContextDeleteAllFormCandidateData START");
903 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
904 Assert.IsNotNull(testingTarget, "null handle");
905 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
907 testingTarget.LoadUrl("http://www.baidu.com");
908 var context = testingTarget.Context;
912 context.DeleteAllFormCandidateData();
916 tlog.Debug(tag, e.Message.ToString());
917 Assert.Fail("Caught Exception : Failed!");
920 testingTarget.ClearCache();
921 testingTarget.ClearCookies();
924 testingTarget.Dispose();
925 tlog.Debug(tag, $"WebContextDeleteAllFormCandidateData END (OK)");
930 [Description("WebContext FreeUnusedMemory.")]
931 [Property("SPEC", "Tizen.NUI.WebContext.FreeUnusedMemory M")]
932 [Property("SPEC_URL", "-")]
933 [Property("CRITERIA", "MR")]
934 [Property("COVPARAM", "")]
935 [Property("AUTHOR", "guowei.wang@samsung.com")]
936 public void WebContextFreeUnusedMemory()
938 tlog.Debug(tag, $"WebContextFreeUnusedMemory START");
940 var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
941 Assert.IsNotNull(testingTarget, "null handle");
942 Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
944 testingTarget.LoadUrl("http://www.baidu.com");
945 var context = testingTarget.Context;
949 context.FreeUnusedMemory();
953 tlog.Debug(tag, e.Message.ToString());
954 Assert.Fail("Caught Exception : Failed!");
957 testingTarget.ClearCache();
958 testingTarget.ClearCookies();
961 testingTarget.Dispose();
962 tlog.Debug(tag, $"WebContextFreeUnusedMemory END (OK)");