[NUI][NUI.Devel.Tests] Fix build errors of NUI.Devel following latest codes.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / WebView / TSWebView.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("public/WebView/WebView")]
13     public class PublicWebViewTest
14     {
15         private const string tag = "NUITEST";
16         private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
17
18         private static string[] runtimeArgs = { "Tizen.NUI.Devel.Tests", "--enable-dali-window", "--enable-spatial-navigation" };
19         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 Tizen.NUI.BaseComponents.WebView webView = null;
21
22         private void JsCallback(string arg) { }
23         private void VideoCallback (bool arg) { }
24         private void GeolocationCallback (string arg1, string arg2) { }
25         private void PromptCallback (string arg1, string arg2) { }
26
27         internal class MyWebView : Tizen.NUI.BaseComponents.WebView
28         {
29             public MyWebView() : base()
30             { }
31
32             public void OnDispose(DisposeTypes type)
33             {
34                 base.Dispose(type);
35             }
36         }
37
38         [SetUp]
39         public void Init()
40         {
41             tlog.Info(tag, "Init() is called!");
42
43             webView = new Tizen.NUI.BaseComponents.WebView(runtimeArgs)
44             {
45                 Size = new Size(500, 200),
46                 UserAgent = USER_AGENT
47             };
48
49             webView.LoadUrl("http://www.baidu.com");
50         }
51
52         [TearDown]
53         public void Destroy()
54         {
55             webView.ClearCache();
56             webView.ClearCookies();
57             webView.Dispose();
58             tlog.Info(tag, "Destroy() is called!");
59         }
60
61         [Test]
62         [Category("P1")]
63         [Description("WebView constructor.")]
64         [Property("SPEC", "Tizen.NUI.WebView.WebView C")]
65         [Property("SPEC_URL", "-")]
66         [Property("CRITERIA", "CONSTR")]
67         [Property("COVPARAM", "")]
68         [Property("AUTHOR", "guowei.wang@samsung.com")]
69         public void WebViewConstructor()
70         {
71             tlog.Debug(tag, $"WebViewConstructor START");
72
73             var testingTarget = new Tizen.NUI.BaseComponents.WebView();
74             Assert.IsNotNull(testingTarget, "null handle");
75             Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
76
77             testingTarget?.Dispose();
78             tlog.Debug(tag, $"WebViewConstructor END (OK)");
79         }
80
81         [Test]
82         [Category("P1")]
83         [Description("WebView constructor.")]
84         [Property("SPEC", "Tizen.NUI.WebView.WebView C")]
85         [Property("SPEC_URL", "-")]
86         [Property("CRITERIA", "CONSTR")]
87         [Property("COVPARAM", "")]
88         [Property("AUTHOR", "guowei.wang@samsung.com")]
89         public void WebViewConstructorWithLocaleAndTimezone()
90         {
91             tlog.Debug(tag, $"WebViewConstructorWithLocaleAndTimezone START");
92
93             var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");
94             Assert.IsNotNull(testingTarget, "null handle");
95             Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
96
97             testingTarget?.Dispose();
98             tlog.Debug(tag, $"WebViewConstructorWithLocaleAndTimezone END (OK)");
99         }
100
101         [Test]
102         [Category("P1")]
103         [Description("WebView constructor.")]
104         [Property("SPEC", "Tizen.NUI.WebView.WebView C")]
105         [Property("SPEC_URL", "-")]
106         [Property("CRITERIA", "CONSTR")]
107         [Property("COVPARAM", "")]
108         [Property("AUTHOR", "guowei.wang@samsung.com")]
109         public void WebViewConstructorWithWebView()
110         {
111             tlog.Debug(tag, $"WebViewConstructorWithWebView START");
112
113             var testingTarget = new Tizen.NUI.BaseComponents.WebView(webView);
114             Assert.IsNotNull(testingTarget, "null handle");
115             Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
116
117             testingTarget.ClearCache();
118             testingTarget.ClearCookies();
119             testingTarget.Dispose();
120             tlog.Debug(tag, $"WebViewConstructorWithWebView END (OK)");
121         }
122
123         [Test]
124         [Category("P1")]
125         [Description("WebView PageLoadStarted.")]
126         [Property("SPEC", "Tizen.NUI.WebView.PageLoadStarted A")]
127         [Property("SPEC_URL", "-")]
128         [Property("CRITERIA", "PRW")]
129         [Property("COVPARAM", "")]
130         [Property("AUTHOR", "guowei.wang@samsung.com")]
131         public void WebViewPageLoadStarted()
132         {
133             tlog.Debug(tag, $"WebViewPageLoadStarted START");
134
135             webView.PageLoadStarted += OnLoadStarted;
136             webView.PageLoadStarted -= OnLoadStarted;
137
138             tlog.Debug(tag, $"WebViewPageLoadStarted END (OK)");
139         }
140
141         [Test]
142         [Category("P1")]
143         [Description("WebView PageLoading.")]
144         [Property("SPEC", "Tizen.NUI.WebView.PageLoading A")]
145         [Property("SPEC_URL", "-")]
146         [Property("CRITERIA", "PRW")]
147         [Property("COVPARAM", "")]
148         [Property("AUTHOR", "guowei.wang@samsung.com")]
149         public void WebViewPageLoading()
150         {
151             tlog.Debug(tag, $"WebViewPageLoading START");
152
153             webView.PageLoading += OnLoading;
154             webView.PageLoading -= OnLoading;
155
156             tlog.Debug(tag, $"WebViewPageLoading END (OK)");
157         }
158
159         [Test]
160         [Category("P1")]
161         [Description("WebView PageLoadFinished.")]
162         [Property("SPEC", "Tizen.NUI.WebView.PageLoadFinished A")]
163         [Property("SPEC_URL", "-")]
164         [Property("CRITERIA", "PRW")]
165         [Property("COVPARAM", "")]
166         [Property("AUTHOR", "guowei.wang@samsung.com")]
167         public void WebViewPageLoadFinished()
168         {
169             tlog.Debug(tag, $"WebViewPageLoadFinished START");
170
171             webView.PageLoadFinished += OnLoadFinished;
172             webView.PageLoadFinished -= OnLoadFinished;
173
174             tlog.Debug(tag, $"WebViewPageLoadFinished END (OK)");
175         }
176
177         [Test]
178         [Category("P1")]
179         [Description("WebView PageLoadError.")]
180         [Property("SPEC", "Tizen.NUI.WebView.PageLoadError A")]
181         [Property("SPEC_URL", "-")]
182         [Property("CRITERIA", "PRW")]
183         [Property("COVPARAM", "")]
184         [Property("AUTHOR", "guowei.wang@samsung.com")]
185         public void WebViewPageLoadError()
186         {
187             tlog.Debug(tag, $"WebViewPageLoadError START");
188
189             webView.PageLoadError += OnLoadError;
190             webView.PageLoadError -= OnLoadError;
191
192             tlog.Debug(tag, $"WebViewPageLoadError END (OK)");
193         }
194
195         [Test]
196         [Category("P1")]
197         [Description("WebView ScrollEdgeReached.")]
198         [Property("SPEC", "Tizen.NUI.WebView.ScrollEdgeReached A")]
199         [Property("SPEC_URL", "-")]
200         [Property("CRITERIA", "PRW")]
201         [Property("COVPARAM", "")]
202         [Property("AUTHOR", "guowei.wang@samsung.com")]
203         public void WebViewScrollEdgeReached()
204         {
205             tlog.Debug(tag, $"WebViewScrollEdgeReached START");
206
207             webView.ScrollEdgeReached += OnEdgeReached;
208             webView.ScrollEdgeReached -= OnEdgeReached;
209
210             tlog.Debug(tag, $"WebViewPageLoadError END (OK)");
211         }
212
213         [Test]
214         [Category("P1")]
215         [Description("WebView UrlChanged.")]
216         [Property("SPEC", "Tizen.NUI.WebView.UrlChanged A")]
217         [Property("SPEC_URL", "-")]
218         [Property("CRITERIA", "PRW")]
219         [Property("COVPARAM", "")]
220         [Property("AUTHOR", "guowei.wang@samsung.com")]
221         public void WebViewUrlChanged()
222         {
223             tlog.Debug(tag, $"WebViewUrlChanged START");
224
225             webView.UrlChanged += OnUrlChange;
226             webView.UrlChanged -= OnUrlChange;
227
228             tlog.Debug(tag, $"WebViewUrlChanged END (OK)");
229         }
230
231         [Test]
232         [Category("P1")]
233         [Description("WebView FormRepostPolicyDecided.")]
234         [Property("SPEC", "Tizen.NUI.WebView.FormRepostPolicyDecided A")]
235         [Property("SPEC_URL", "-")]
236         [Property("CRITERIA", "PRW")]
237         [Property("COVPARAM", "")]
238         [Property("AUTHOR", "guowei.wang@samsung.com")]
239         public void WebViewFormRepostPolicyDecided()
240         {
241             tlog.Debug(tag, $"WebViewFormRepostPolicyDecided START");
242
243             webView.FormRepostPolicyDecided += OnFormRepostPolicyDecide;
244             webView.FormRepostPolicyDecided -= OnFormRepostPolicyDecide;
245
246             tlog.Debug(tag, $"WebViewFormRepostPolicyDecided END (OK)");
247         }
248
249         [Test]
250         [Category("P1")]
251         [Description("WebView FrameRendered.")]
252         [Property("SPEC", "Tizen.NUI.WebView.FrameRendered A")]
253         [Property("SPEC_URL", "-")]
254         [Property("CRITERIA", "PRW")]
255         [Property("COVPARAM", "")]
256         [Property("AUTHOR", "guowei.wang@samsung.com")]
257         public void WebViewFrameRendered()
258         {
259             tlog.Debug(tag, $"WebViewFrameRendered START");
260
261             webView.FrameRendered += OnFrameRender;
262             webView.FrameRendered -= OnFrameRender;
263
264             tlog.Debug(tag, $"WebViewFrameRendered END (OK)");
265         }
266
267         [Test]
268         [Category("P1")]
269         [Description("WebView ResponsePolicyDecided.")]
270         [Property("SPEC", "Tizen.NUI.WebView.ResponsePolicyDecided A")]
271         [Property("SPEC_URL", "-")]
272         [Property("CRITERIA", "PRW")]
273         [Property("COVPARAM", "")]
274         [Property("AUTHOR", "guowei.wang@samsung.com")]
275         public void WebViewResponsePolicyDecided()
276         {
277             tlog.Debug(tag, $"WebViewResponsePolicyDecided START");
278
279             webView.ResponsePolicyDecided += OnResponsePolicyDecide;
280             webView.ResponsePolicyDecided -= OnResponsePolicyDecide;
281
282             tlog.Debug(tag, $"WebViewResponsePolicyDecided END (OK)");
283         }
284
285         [Test]
286         [Category("P1")]
287         [Description("WebView CertificateConfirmed.")]
288         [Property("SPEC", "Tizen.NUI.WebView.CertificateConfirmed A")]
289         [Property("SPEC_URL", "-")]
290         [Property("CRITERIA", "PRW")]
291         [Property("COVPARAM", "")]
292         [Property("AUTHOR", "guowei.wang@samsung.com")]
293         public void WebViewCertificateConfirmed()
294         {
295             tlog.Debug(tag, $"WebViewCertificateConfirmed START");
296
297             webView.CertificateConfirmed += OnCertificateConfirme;
298             webView.CertificateConfirmed -= OnCertificateConfirme;
299
300             tlog.Debug(tag, $"WebViewCertificateConfirmed END (OK)");
301         }
302
303         [Test]
304         [Category("P1")]
305         [Description("WebView SslCertificateChanged.")]
306         [Property("SPEC", "Tizen.NUI.WebView.SslCertificateChanged A")]
307         [Property("SPEC_URL", "-")]
308         [Property("CRITERIA", "PRW")]
309         [Property("COVPARAM", "")]
310         [Property("AUTHOR", "guowei.wang@samsung.com")]
311         public void WebViewSslCertificateChanged()
312         {
313             tlog.Debug(tag, $"WebViewSslCertificateChanged START");
314
315             webView.SslCertificateChanged += OnSslCertificateChange;
316             webView.SslCertificateChanged -= OnSslCertificateChange;
317
318             tlog.Debug(tag, $"WebViewSslCertificateChanged END (OK)");
319         }
320
321         [Test]
322         [Category("P1")]
323         [Description("WebView HttpAuthRequested.")]
324         [Property("SPEC", "Tizen.NUI.WebView.HttpAuthRequested A")]
325         [Property("SPEC_URL", "-")]
326         [Property("CRITERIA", "PRW")]
327         [Property("COVPARAM", "")]
328         [Property("AUTHOR", "guowei.wang@samsung.com")]
329         public void WebViewHttpAuthRequested()
330         {
331             tlog.Debug(tag, $"WebViewHttpAuthRequested START");
332
333             webView.HttpAuthRequested += OnHttpAuthRequeste;
334             webView.HttpAuthRequested -= OnHttpAuthRequeste;
335
336             tlog.Debug(tag, $"WebViewHttpAuthRequested END (OK)");
337         }
338
339         [Test]
340         [Category("P1")]
341         [Description("WebView ConsoleMessageReceived.")]
342         [Property("SPEC", "Tizen.NUI.WebView.ConsoleMessageReceived A")]
343         [Property("SPEC_URL", "-")]
344         [Property("CRITERIA", "PRW")]
345         [Property("COVPARAM", "")]
346         [Property("AUTHOR", "guowei.wang@samsung.com")]
347         public void WebViewConsoleMessageReceived()
348         {
349             tlog.Debug(tag, $"WebViewHttpAuthRequested START");
350
351             webView.ConsoleMessageReceived += OnConsoleMessageReceive;
352             webView.ConsoleMessageReceived -= OnConsoleMessageReceive;
353
354             tlog.Debug(tag, $"WebViewConsoleMessageReceived END (OK)");
355         }
356
357         [Test]
358         [Category("P1")]
359         [Description("WebView BackForwardList.")]
360         [Property("SPEC", "Tizen.NUI.WebView.BackForwardList A")]
361         [Property("SPEC_URL", "-")]
362         [Property("CRITERIA", "PRO")]
363         [Property("COVPARAM", "")]
364         [Property("AUTHOR", "guowei.wang@samsung.com")]
365         public void WebViewBackForwardList()
366         {
367             tlog.Debug(tag, $"WebViewBackForwardList START");
368
369             var result = webView.BackForwardList;
370             tlog.Debug(tag, "ForwardList : " + result);
371
372             tlog.Debug(tag, $"WebViewBackForwardList END (OK)");
373         }
374
375         [Test]
376         [Category("P1")]
377         [Description("WebView Context.")]
378         [Property("SPEC", "Tizen.NUI.WebView.Context A")]
379         [Property("SPEC_URL", "-")]
380         [Property("CRITERIA", "PRO")]
381         [Property("COVPARAM", "")]
382         [Property("AUTHOR", "guowei.wang@samsung.com")]
383         public void WebViewContext()
384         {
385             tlog.Debug(tag, $"WebViewContext START");
386
387             var result = webView.Context;
388             tlog.Debug(tag, "Context : " + result);
389
390             tlog.Debug(tag, $"WebViewContext END (OK)");
391         }
392
393         [Test]
394         [Category("P1")]
395         [Description("WebView CookieManager.")]
396         [Property("SPEC", "Tizen.NUI.WebView.CookieManager A")]
397         [Property("SPEC_URL", "-")]
398         [Property("CRITERIA", "PRO")]
399         [Property("COVPARAM", "")]
400         [Property("AUTHOR", "guowei.wang@samsung.com")]
401         public void WebViewCookieManager()
402         {
403             tlog.Debug(tag, $"WebViewCookieManager START");
404
405             var result = webView.CookieManager;
406             tlog.Debug(tag, "CookieManager : " + result);
407
408             tlog.Debug(tag, $"WebViewCookieManager END (OK)");
409         }
410
411         [Test]
412         [Category("P1")]
413         [Description("WebView Settings.")]
414         [Property("SPEC", "Tizen.NUI.WebView.Settings A")]
415         [Property("SPEC_URL", "-")]
416         [Property("CRITERIA", "PRO")]
417         [Property("COVPARAM", "")]
418         [Property("AUTHOR", "guowei.wang@samsung.com")]
419         public void WebViewSettings()
420         {
421             tlog.Debug(tag, $"WebViewSettings START");
422
423             var result = webView.Settings;
424             tlog.Debug(tag, "Settings : " + result);
425
426             tlog.Debug(tag, $"WebViewSettings END (OK)");
427         }
428
429         [Test]
430         [Category("P1")]
431         [Description("WebView Url.")]
432         [Property("SPEC", "Tizen.NUI.WebView.Url A")]
433         [Property("SPEC_URL", "-")]
434         [Property("CRITERIA", "PRW")]
435         [Property("COVPARAM", "")]
436         [Property("AUTHOR", "guowei.wang@samsung.com")]
437         public void WebViewUrl()
438         {
439             tlog.Debug(tag, $"WebViewUrl START");
440
441             webView.Url = url;
442             tlog.Debug(tag, "Url : " + webView.Url);
443
444             tlog.Debug(tag, $"WebViewUrl END (OK)");
445         }
446
447         [Test]
448         [Category("P1")]
449         [Description("WebView CacheModel.")]
450         [Property("SPEC", "Tizen.NUI.WebView.CacheModel A")]
451         [Property("SPEC_URL", "-")]
452         [Property("CRITERIA", "PRW")]
453         [Property("COVPARAM", "")]
454         [Property("AUTHOR", "guowei.wang@samsung.com")]
455         public void WebViewCacheModel()
456         {
457             tlog.Debug(tag, $"WebViewCacheModel START");
458
459             webView.CacheModel = Tizen.NUI.CacheModel.DocumentViewer;
460             tlog.Debug(tag, "CacheModel : " + webView.CacheModel);
461
462             webView.CacheModel = Tizen.NUI.CacheModel.DocumentBrowser;
463             tlog.Debug(tag, "CacheModel : " + webView.CacheModel);
464
465             webView.CacheModel = Tizen.NUI.CacheModel.PrimaryWebBrowser;
466             tlog.Debug(tag, "CacheModel : " + webView.CacheModel);
467
468             tlog.Debug(tag, $"WebViewCacheModel END (OK)");
469         }
470
471         [Test]
472         [Category("P1")]
473         [Description("WebView CookieAcceptPolicy.")]
474         [Property("SPEC", "Tizen.NUI.WebView.CookieAcceptPolicy A")]
475         [Property("SPEC_URL", "-")]
476         [Property("CRITERIA", "PRW")]
477         [Property("COVPARAM", "")]
478         [Property("AUTHOR", "guowei.wang@samsung.com")]
479         public void WebViewCookieAcceptPolicy()
480         {
481             tlog.Debug(tag, $"WebViewCookieAcceptPolicy START");
482
483             webView.CookieAcceptPolicy = (CookieAcceptPolicy)Tizen.NUI.WebCookieManager.CookieAcceptPolicyType.NoThirdParty;
484             tlog.Debug(tag, "CookieAcceptPolicy : " + webView.CookieAcceptPolicy);
485
486             webView.CookieAcceptPolicy = (CookieAcceptPolicy)Tizen.NUI.WebCookieManager.CookieAcceptPolicyType.Always;
487             tlog.Debug(tag, "CookieAcceptPolicy : " + webView.CookieAcceptPolicy);
488
489             webView.CookieAcceptPolicy = (CookieAcceptPolicy)Tizen.NUI.WebCookieManager.CookieAcceptPolicyType.Never;
490             tlog.Debug(tag, "CookieAcceptPolicy : " + webView.CookieAcceptPolicy);
491
492             tlog.Debug(tag, $"WebViewCookieAcceptPolicy END (OK)");
493         }
494
495         [Test]
496         [Category("P1")]
497         [Description("WebView UserAgent.")]
498         [Property("SPEC", "Tizen.NUI.WebView.UserAgent A")]
499         [Property("SPEC_URL", "-")]
500         [Property("CRITERIA", "PRW")]
501         [Property("COVPARAM", "")]
502         [Property("AUTHOR", "guowei.wang@samsung.com")]
503         public void WebViewUserAgent()
504         {
505             tlog.Debug(tag, $"WebViewUserAgent START");
506
507             webView.UserAgent = "Mozilla/5.0 (Linux; Android 4.2.1; M040 Build/JOP40D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.59 Mobile Safari/537.36";
508             tlog.Debug(tag, "UserAgent : " + webView.UserAgent);
509
510             tlog.Debug(tag, $"WebViewUserAgent END (OK)");
511         }
512
513         [Test]
514         [Category("P1")]
515         [Description("WebView EnableJavaScript.")]
516         [Property("SPEC", "Tizen.NUI.WebView.EnableJavaScript A")]
517         [Property("SPEC_URL", "-")]
518         [Property("CRITERIA", "PRW")]
519         [Property("COVPARAM", "")]
520         [Property("AUTHOR", "guowei.wang@samsung.com")]
521         public void WebViewEnableJavaScript()
522         {
523             tlog.Debug(tag, $"WebViewEnableJavaScript START");
524
525             webView.EnableJavaScript = true;
526             tlog.Debug(tag, "EnableJavaScript : " + webView.EnableJavaScript);
527
528             webView.EnableJavaScript = false;
529             tlog.Debug(tag, "EnableJavaScript : " + webView.EnableJavaScript);
530
531             tlog.Debug(tag, $"WebViewEnableJavaScript END (OK)");
532         }
533
534         [Test]
535         [Category("P1")]
536         [Description("WebView LoadImagesAutomatically.")]
537         [Property("SPEC", "Tizen.NUI.WebView.LoadImagesAutomatically A")]
538         [Property("SPEC_URL", "-")]
539         [Property("CRITERIA", "PRW")]
540         [Property("COVPARAM", "")]
541         [Property("AUTHOR", "guowei.wang@samsung.com")]
542         public void WebViewLoadImagesAutomatically()
543         {
544             tlog.Debug(tag, $"WebViewLoadImagesAutomatically START");
545
546             webView.LoadImagesAutomatically = true;
547             tlog.Debug(tag, "LoadImagesAutomatically : " + webView.LoadImagesAutomatically);
548
549             webView.LoadImagesAutomatically = false;
550             tlog.Debug(tag, "LoadImagesAutomatically : " + webView.LoadImagesAutomatically);
551
552             tlog.Debug(tag, $"WebViewLoadImagesAutomatically END (OK)");
553         }
554
555         [Test]
556         [Category("P1")]
557         [Description("WebView DefaultTextEncodingName.")]
558         [Property("SPEC", "Tizen.NUI.WebView.DefaultTextEncodingName A")]
559         [Property("SPEC_URL", "-")]
560         [Property("CRITERIA", "PRW")]
561         [Property("COVPARAM", "")]
562         [Property("AUTHOR", "guowei.wang@samsung.com")]
563         public void WebViewDefaultTextEncodingName()
564         {
565             tlog.Debug(tag, $"WebViewDefaultTextEncodingName START");
566
567             var result = webView.DefaultTextEncodingName;
568             tlog.Debug(tag, "DefaultTextEncodingName : " + result);
569
570             webView.DefaultTextEncodingName = "gbk";
571             tlog.Debug(tag, "DefaultTextEncodingName : " + result);
572
573             tlog.Debug(tag, $"WebViewDefaultTextEncodingName END (OK)");
574         }
575
576         [Test]
577         [Category("P1")]
578         [Description("WebView DefaultFontSize.")]
579         [Property("SPEC", "Tizen.NUI.WebView.DefaultFontSize A")]
580         [Property("SPEC_URL", "-")]
581         [Property("CRITERIA", "PRW")]
582         [Property("COVPARAM", "")]
583         [Property("AUTHOR", "guowei.wang@samsung.com")]
584         public void WebViewDefaultFontSize()
585         {
586             tlog.Debug(tag, $"WebViewDefaultFontSize START");
587
588             var result = webView.DefaultFontSize;
589             tlog.Debug(tag, "DefaultFontSize : " + result);
590
591             webView.DefaultFontSize = 32;
592             tlog.Debug(tag, "DefaultFontSize : " + result);
593
594             tlog.Debug(tag, $"WebViewDefaultFontSize END (OK)");
595         }
596
597         [Test]
598         [Category("P1")]
599         [Description("WebView ScrollSize.")]
600         [Property("SPEC", "Tizen.NUI.WebView.ScrollSize A")]
601         [Property("SPEC_URL", "-")]
602         [Property("CRITERIA", "PRO")]
603         [Property("COVPARAM", "")]
604         [Property("AUTHOR", "guowei.wang@samsung.com")]
605         public void WebViewScrollSize()
606         {
607             tlog.Debug(tag, $"WebViewScrollSize START");
608
609             tlog.Debug(tag, "Width : " + webView.ScrollSize.Width);
610             tlog.Debug(tag, "Height : " + webView.ScrollSize.Height);
611
612             tlog.Debug(tag, $"WebViewScrollSize END (OK)");
613         }
614
615         [Test]
616         [Category("P1")]
617         [Description("WebView ContentSize.")]
618         [Property("SPEC", "Tizen.NUI.WebView.ContentSize A")]
619         [Property("SPEC_URL", "-")]
620         [Property("CRITERIA", "PRO")]
621         [Property("COVPARAM", "")]
622         [Property("AUTHOR", "guowei.wang@samsung.com")]
623         public void WebViewContentSize()
624         {
625             tlog.Debug(tag, $"WebViewContentSize START");
626
627             tlog.Debug(tag, "Width : " + webView.ContentSize.Width);
628             tlog.Debug(tag, "Height : " + webView.ContentSize.Height);
629
630             tlog.Debug(tag, $"WebViewContentSize END (OK)");
631         }
632
633         [Test]
634         [Category("P1")]
635         [Description("WebView VideoHoleEnabled.")]
636         [Property("SPEC", "Tizen.NUI.WebView.VideoHoleEnabled A")]
637         [Property("SPEC_URL", "-")]
638         [Property("CRITERIA", "PRW")]
639         [Property("COVPARAM", "")]
640         [Property("AUTHOR", "guowei.wang@samsung.com")]
641         public void WebViewVideoHoleEnabled()
642         {
643             tlog.Debug(tag, $"WebViewVideoHoleEnabled START");
644
645             webView.VideoHoleEnabled = true;
646             tlog.Debug(tag, "VideoHoleEnabled : " + webView.VideoHoleEnabled);
647
648             webView.VideoHoleEnabled = false;
649             tlog.Debug(tag, "VideoHoleEnabled : " + webView.VideoHoleEnabled);
650
651             tlog.Debug(tag, $"WebViewVideoHoleEnabled END (OK)");
652         }
653
654         [Test]
655         [Category("P1")]
656         [Description("WebView MouseEventsEnabled.")]
657         [Property("SPEC", "Tizen.NUI.WebView.MouseEventsEnabled A")]
658         [Property("SPEC_URL", "-")]
659         [Property("CRITERIA", "PRW")]
660         [Property("COVPARAM", "")]
661         [Property("AUTHOR", "guowei.wang@samsung.com")]
662         public void WebViewMouseEventsEnabled()
663         {
664             tlog.Debug(tag, $"WebViewMouseEventsEnabled START");
665
666             webView.MouseEventsEnabled = true;
667             tlog.Debug(tag, "MouseEventsEnabled : " + webView.MouseEventsEnabled);
668
669             webView.MouseEventsEnabled = false;
670             tlog.Debug(tag, "MouseEventsEnabled : " + webView.MouseEventsEnabled);
671
672             tlog.Debug(tag, $"WebViewMouseEventsEnabled END (OK)");
673         }
674
675         [Test]
676         [Category("P1")]
677         [Description("WebView KeyEventsEnabled.")]
678         [Property("SPEC", "Tizen.NUI.WebView.KeyEventsEnabled A")]
679         [Property("SPEC_URL", "-")]
680         [Property("CRITERIA", "PRW")]
681         [Property("COVPARAM", "")]
682         [Property("AUTHOR", "guowei.wang@samsung.com")]
683         public void WebViewKeyEventsEnabled()
684         {
685             tlog.Debug(tag, $"WebViewKeyEventsEnabled START");
686
687             webView.KeyEventsEnabled = true;
688             tlog.Debug(tag, "KeyEventsEnabled : " + webView.KeyEventsEnabled);
689
690             webView.KeyEventsEnabled = false;
691             tlog.Debug(tag, "KeyEventsEnabled : " + webView.KeyEventsEnabled);
692
693             tlog.Debug(tag, $"WebViewKeyEventsEnabled END (OK)");
694         }
695
696         [Test]
697         [Category("P1")]
698         [Description("WebView ContentBackgroundColor.")]
699         [Property("SPEC", "Tizen.NUI.WebView.ContentBackgroundColor A")]
700         [Property("SPEC_URL", "-")]
701         [Property("CRITERIA", "PRW")]
702         [Property("COVPARAM", "")]
703         [Property("AUTHOR", "guowei.wang@samsung.com")]
704         public void WebViewContentBackgroundColor()
705         {
706             tlog.Debug(tag, $"WebViewContentBackgroundColor START");
707
708             webView.ContentBackgroundColor = new Vector4(0.3f, 0.5f, 1.0f, 0.0f);
709             tlog.Debug(tag, "ContentBackgroundColor : " + webView.ContentBackgroundColor);
710
711             tlog.Debug(tag, $"WebViewContentBackgroundColor END (OK)");
712         }
713
714         [Test]
715         [Category("P1")]
716         [Description("WebView TilesClearedWhenHidden.")]
717         [Property("SPEC", "Tizen.NUI.WebView.TilesClearedWhenHidden A")]
718         [Property("SPEC_URL", "-")]
719         [Property("CRITERIA", "PRW")]
720         [Property("COVPARAM", "")]
721         [Property("AUTHOR", "guowei.wang@samsung.com")]
722         public void WebViewTilesClearedWhenHidden()
723         {
724             tlog.Debug(tag, $"WebViewTilesClearedWhenHidden START");
725
726             webView.TilesClearedWhenHidden = true;
727             tlog.Debug(tag, "TilesClearedWhenHidden : " + webView.TilesClearedWhenHidden);
728
729             webView.TilesClearedWhenHidden = false;
730             tlog.Debug(tag, "TilesClearedWhenHidden : " + webView.TilesClearedWhenHidden);
731
732             tlog.Debug(tag, $"WebViewTilesClearedWhenHidden END (OK)");
733         }
734
735         [Test]
736         [Category("P1")]
737         [Description("WebView TileCoverAreaMultiplier.")]
738         [Property("SPEC", "Tizen.NUI.WebView.TileCoverAreaMultiplier A")]
739         [Property("SPEC_URL", "-")]
740         [Property("CRITERIA", "PRW")]
741         [Property("COVPARAM", "")]
742         [Property("AUTHOR", "guowei.wang@samsung.com")]
743         public void WebViewTileCoverAreaMultiplier()
744         {
745             tlog.Debug(tag, $"WebViewTileCoverAreaMultiplier START");
746
747             webView.TileCoverAreaMultiplier = 0.3f;
748             tlog.Debug(tag, "TileCoverAreaMultiplier : " + webView.TileCoverAreaMultiplier);
749
750             tlog.Debug(tag, $"WebViewTileCoverAreaMultiplier END (OK)");
751         }
752
753         [Test]
754         [Category("P1")]
755         [Description("WebView CursorEnabledByClient.")]
756         [Property("SPEC", "Tizen.NUI.WebView.CursorEnabledByClient A")]
757         [Property("SPEC_URL", "-")]
758         [Property("CRITERIA", "PRW")]
759         [Property("COVPARAM", "")]
760         [Property("AUTHOR", "guowei.wang@samsung.com")]
761         public void WebViewCursorEnabledByClient()
762         {
763             tlog.Debug(tag, $"WebViewCursorEnabledByClient START");
764
765             webView.CursorEnabledByClient = true;
766             tlog.Debug(tag, "CursorEnabledByClient : " + webView.CursorEnabledByClient);
767
768             webView.CursorEnabledByClient = false;
769             tlog.Debug(tag, "CursorEnabledByClient : " + webView.CursorEnabledByClient);
770
771             tlog.Debug(tag, $"WebViewCursorEnabledByClient END (OK)");
772         }
773
774         [Test]
775         [Category("P1")]
776         [Description("WebView SelectedText.")]
777         [Property("SPEC", "Tizen.NUI.WebView.SelectedText A")]
778         [Property("SPEC_URL", "-")]
779         [Property("CRITERIA", "PRO")]
780         [Property("COVPARAM", "")]
781         [Property("AUTHOR", "guowei.wang@samsung.com")]
782         public void WebViewSelectedText()
783         {
784             tlog.Debug(tag, $"WebViewSelectedText START");
785
786             var text = webView.SelectedText;
787             tlog.Debug(tag, "SelectedText : " + text);
788
789             tlog.Debug(tag, $"WebViewSelectedText END (OK)");
790         }
791
792         [Test]
793         [Category("P1")]
794         [Description("WebView Title.")]
795         [Property("SPEC", "Tizen.NUI.WebView.Title A")]
796         [Property("SPEC_URL", "-")]
797         [Property("CRITERIA", "PRO")]
798         [Property("COVPARAM", "")]
799         [Property("AUTHOR", "guowei.wang@samsung.com")]
800         public void WebViewTitle()
801         {
802             tlog.Debug(tag, $"WebViewTitle START");
803
804             var title = webView.Title;
805             tlog.Debug(tag, "Title : " + title);
806
807             tlog.Debug(tag, $"WebViewTitle END (OK)");
808         }
809
810         [Test]
811         [Category("P1")]
812         [Description("WebView Favicon.")]
813         [Property("SPEC", "Tizen.NUI.WebView.Favicon A")]
814         [Property("SPEC_URL", "-")]
815         [Property("CRITERIA", "PRO")]
816         [Property("COVPARAM", "")]
817         [Property("AUTHOR", "guowei.wang@samsung.com")]
818         public void WebViewFavicon()
819         {
820             tlog.Debug(tag, $"WebViewFavicon START");
821
822             var fav = webView.Favicon;
823             tlog.Debug(tag, "Favicon : " + fav);
824
825             tlog.Debug(tag, $"WebViewFavicon END (OK)");
826         }
827
828         [Test]
829         [Category("P1")]
830         [Description("WebView PageZoomFactor.")]
831         [Property("SPEC", "Tizen.NUI.WebView.PageZoomFactor A")]
832         [Property("SPEC_URL", "-")]
833         [Property("CRITERIA", "PRW")]
834         [Property("COVPARAM", "")]
835         [Property("AUTHOR", "guowei.wang@samsung.com")]
836         public void WebViewPageZoomFactor()
837         {
838             tlog.Debug(tag, $"WebViewPageZoomFactor START");
839
840             webView.PageZoomFactor = 0.3f;
841             tlog.Debug(tag, "PageZoomFactor : " + webView.PageZoomFactor);
842
843             tlog.Debug(tag, $"WebViewPageZoomFactor END (OK)");
844         }
845
846         [Test]
847         [Category("P1")]
848         [Description("WebView TextZoomFactor.")]
849         [Property("SPEC", "Tizen.NUI.WebView.TextZoomFactor A")]
850         [Property("SPEC_URL", "-")]
851         [Property("CRITERIA", "PRW")]
852         [Property("COVPARAM", "")]
853         [Property("AUTHOR", "guowei.wang@samsung.com")]
854         public void WebViewTextZoomFactor()
855         {
856             tlog.Debug(tag, $"WebViewTextZoomFactor START");
857
858             webView.TextZoomFactor = 0.2f;
859             tlog.Debug(tag, "TextZoomFactor : " + webView.TextZoomFactor);
860
861             tlog.Debug(tag, $"WebViewTextZoomFactor END (OK)");
862         }
863
864         [Test]
865         [Category("P1")]
866         [Description("WebView LoadProgressPercentage.")]
867         [Property("SPEC", "Tizen.NUI.WebView.LoadProgressPercentage A")]
868         [Property("SPEC_URL", "-")]
869         [Property("CRITERIA", "PRO")]
870         [Property("COVPARAM", "")]
871         [Property("AUTHOR", "guowei.wang@samsung.com")]
872         public void WebViewLoadProgressPercentage()
873         {
874             tlog.Debug(tag, $"WebViewLoadProgressPercentage START");
875
876             var result = webView.LoadProgressPercentage;
877             tlog.Debug(tag, "LoadProgressPercentage : " + result);
878
879             tlog.Debug(tag, $"WebViewLoadProgressPercentage END (OK)");
880         }
881
882         [Test]
883         [Category("P1")]
884         [Description("WebView LoadHtmlString.")]
885         [Property("SPEC", "Tizen.NUI.WebView.LoadHtmlString M")]
886         [Property("SPEC_URL", "-")]
887         [Property("CRITERIA", "MR")]
888         [Property("COVPARAM", "")]
889         [Property("AUTHOR", "guowei.wang@samsung.com")]
890         public void WebViewLoadHtmlString()
891         {
892             tlog.Debug(tag, $"WebViewLoadHtmlString START");
893
894             try
895             {
896                 webView.LoadHtmlString("<html><head lang=\"en\"></head></html>");
897             }
898             catch (Exception e)
899             {
900                 tlog.Debug(tag, e.Message.ToString());
901                 Assert.Fail("Caught Exception : Failed!");
902             }
903
904             tlog.Debug(tag, $"WebViewLoadHtmlString END (OK)");
905         }
906
907         [Test]
908         [Category("P1")]
909         [Description("WebView LoadContents.")]
910         [Property("SPEC", "Tizen.NUI.WebView.LoadContents M")]
911         [Property("SPEC_URL", "-")]
912         [Property("CRITERIA", "MR")]
913         [Property("COVPARAM", "")]
914         [Property("AUTHOR", "guowei.wang@samsung.com")]
915         public void WebViewLoadContents()
916         {
917             tlog.Debug(tag, $"WebViewLoadContents START");
918
919             try
920             {
921                 webView.LoadContents("body", 18, " ", "gbk", "http://www.runoob.com/jsref/prop-doc-baseuri.html");
922             }
923             catch (Exception e)
924             {
925                 tlog.Debug(tag, e.Message.ToString());
926                 Assert.Fail("Caught Exception : Failed!");
927             }
928
929             tlog.Debug(tag, $"WebViewLoadContents END (OK)");
930         }
931
932         [Test]
933         [Category("P1")]
934         [Description("WebView Reload.")]
935         [Property("SPEC", "Tizen.NUI.WebView.Reload M")]
936         [Property("SPEC_URL", "-")]
937         [Property("CRITERIA", "MR")]
938         [Property("COVPARAM", "")]
939         [Property("AUTHOR", "guowei.wang@samsung.com")]
940         public void WebViewReload()
941         {
942             tlog.Debug(tag, $"WebViewReload START");
943
944             try
945             {
946                 webView.Reload();
947             }
948             catch (Exception e)
949             {
950                 tlog.Debug(tag, e.Message.ToString());
951                 Assert.Fail("Caught Exception : Failed!");
952             }
953
954             tlog.Debug(tag, $"WebViewReload END (OK)");
955         }
956
957         [Test]
958         [Category("P1")]
959         [Description("WebView ReloadWithoutCache.")]
960         [Property("SPEC", "Tizen.NUI.WebView.ReloadWithoutCache M")]
961         [Property("SPEC_URL", "-")]
962         [Property("CRITERIA", "MR")]
963         [Property("COVPARAM", "")]
964         [Property("AUTHOR", "guowei.wang@samsung.com")]
965         public void WebViewReloadWithoutCache()
966         {
967             tlog.Debug(tag, $"WebViewReloadWithoutCache START");
968
969             try
970             {
971                 webView.ReloadWithoutCache();
972             }
973             catch (Exception e)
974             {
975                 tlog.Debug(tag, e.Message.ToString());
976                 Assert.Fail("Caught Exception : Failed!");
977             }
978
979             tlog.Debug(tag, $"WebViewReloadWithoutCache END (OK)");
980         }
981
982         [Test]
983         [Category("P1")]
984         [Description("WebView StopLoading.")]
985         [Property("SPEC", "Tizen.NUI.WebView.StopLoading M")]
986         [Property("SPEC_URL", "-")]
987         [Property("CRITERIA", "MR")]
988         [Property("COVPARAM", "")]
989         [Property("AUTHOR", "guowei.wang@samsung.com")]
990         public void WebViewStopLoading()
991         {
992             tlog.Debug(tag, $"WebViewStopLoading START");
993
994             try
995             {
996                 webView.StopLoading();
997             }
998             catch (Exception e)
999             {
1000                 tlog.Debug(tag, e.Message.ToString());
1001                 Assert.Fail("Caught Exception : Failed!");
1002             }
1003
1004             tlog.Debug(tag, $"WebViewStopLoading END (OK)");
1005         }
1006
1007         [Test]
1008         [Category("P1")]
1009         [Description("WebView Suspend.")]
1010         [Property("SPEC", "Tizen.NUI.WebView.Suspend M")]
1011         [Property("SPEC_URL", "-")]
1012         [Property("CRITERIA", "MR")]
1013         [Property("COVPARAM", "")]
1014         [Property("AUTHOR", "guowei.wang@samsung.com")]
1015         public void WebViewSuspend()
1016         {
1017             tlog.Debug(tag, $"WebViewSuspend START");
1018
1019             try
1020             {
1021                 webView.Suspend();
1022                 webView.Resume();
1023             }
1024             catch (Exception e)
1025             {
1026                 tlog.Debug(tag, e.Message.ToString());
1027                 Assert.Fail("Caught Exception : Failed!");
1028             }
1029
1030             tlog.Debug(tag, $"WebViewSuspend END (OK)");
1031         }
1032
1033         [Test]
1034         [Category("P1")]
1035         [Description("WebView SuspendNetworkLoading.")]
1036         [Property("SPEC", "Tizen.NUI.WebView.SuspendNetworkLoading M")]
1037         [Property("SPEC_URL", "-")]
1038         [Property("CRITERIA", "MR")]
1039         [Property("COVPARAM", "")]
1040         [Property("AUTHOR", "guowei.wang@samsung.com")]
1041         public void WebViewSuspendNetworkLoading()
1042         {
1043             tlog.Debug(tag, $"WebViewSuspendNetworkLoading START");
1044
1045             try
1046             {
1047                 webView.SuspendNetworkLoading();
1048                 webView.ResumeNetworkLoading();
1049             }
1050             catch (Exception e)
1051             {
1052                 tlog.Debug(tag, e.Message.ToString());
1053                 Assert.Fail("Caught Exception : Failed!");
1054             }
1055
1056             tlog.Debug(tag, $"WebViewSuspendNetworkLoading END (OK)");
1057         }
1058
1059         [Test]
1060         [Category("P1")]
1061         [Description("WebView AddCustomHeader.")]
1062         [Property("SPEC", "Tizen.NUI.WebView.AddCustomHeader M")]
1063         [Property("SPEC_URL", "-")]
1064         [Property("CRITERIA", "MR")]
1065         [Property("COVPARAM", "")]
1066         [Property("AUTHOR", "guowei.wang@samsung.com")]
1067         public void WebViewAddCustomHeader()
1068         {
1069             tlog.Debug(tag, $"WebViewAddCustomHeader START");
1070
1071             var result = webView.AddCustomHeader("customHeader_title", "font-size: 32rpx");
1072             tlog.Debug(tag, "AddCustomHeader : " + result);
1073
1074             result = webView.RemoveCustomHeader("customHeader_title");
1075             tlog.Debug(tag, "RemoveCustomHeader : " + result);
1076
1077             tlog.Debug(tag, $"WebViewAddCustomHeader END (OK)");
1078         }
1079
1080         [Test]
1081         [Category("P1")]
1082         [Description("WebView ScrollBy.")]
1083         [Property("SPEC", "Tizen.NUI.WebView.ScrollBy M")]
1084         [Property("SPEC_URL", "-")]
1085         [Property("CRITERIA", "MR")]
1086         [Property("COVPARAM", "")]
1087         [Property("AUTHOR", "guowei.wang@samsung.com")]
1088         public void WebViewScrollBy()
1089         {
1090             tlog.Debug(tag, $"WebViewScrollBy START");
1091
1092             try
1093             {
1094                 webView.ScrollBy(1, 1);
1095             }
1096             catch (Exception e)
1097             {
1098                 tlog.Debug(tag, e.Message.ToString());
1099                 Assert.Fail("Caught Exception : Failed!");
1100             }
1101
1102             tlog.Debug(tag, $"WebViewScrollBy END (OK)");
1103         }
1104
1105         [Test]
1106         [Category("P1")]
1107         [Description("WebView ScrollEdgeBy.")]
1108         [Property("SPEC", "Tizen.NUI.WebView.ScrollEdgeBy M")]
1109         [Property("SPEC_URL", "-")]
1110         [Property("CRITERIA", "MR")]
1111         [Property("COVPARAM", "")]
1112         [Property("AUTHOR", "guowei.wang@samsung.com")]
1113         public void WebViewScrollEdgeBy()
1114         {
1115             tlog.Debug(tag, $"WebViewScrollEdgeBy START");
1116
1117             var result = webView.ScrollEdgeBy(1, 1);
1118             tlog.Debug(tag, "ScrollEdgeBy : " + result);
1119
1120             tlog.Debug(tag, $"WebViewScrollEdgeBy END (OK)");
1121         }
1122
1123         [Test]
1124         [Category("P1")]
1125         [Description("WebView GoBack.")]
1126         [Property("SPEC", "Tizen.NUI.WebView.GoBack M")]
1127         [Property("SPEC_URL", "-")]
1128         [Property("CRITERIA", "MR")]
1129         [Property("COVPARAM", "")]
1130         [Property("AUTHOR", "guowei.wang@samsung.com")]
1131         public void WebViewGoBack()
1132         {
1133             tlog.Debug(tag, $"WebViewGoBack START");
1134
1135             try
1136             {
1137                 webView.GoBack();
1138             }
1139             catch (Exception e)
1140             {
1141                 tlog.Debug(tag, e.Message.ToString());
1142                 Assert.Fail("Caught Exception : Failed!");
1143             }
1144
1145             tlog.Debug(tag, $"WebViewGoBack END (OK)");
1146         }
1147
1148         [Test]
1149         [Category("P1")]
1150         [Description("WebView GoForward.")]
1151         [Property("SPEC", "Tizen.NUI.WebView.GoForward M")]
1152         [Property("SPEC_URL", "-")]
1153         [Property("CRITERIA", "MR")]
1154         [Property("COVPARAM", "")]
1155         [Property("AUTHOR", "guowei.wang@samsung.com")]
1156         public void WebViewGoForward()
1157         {
1158             tlog.Debug(tag, $"WebViewGoForward START");
1159
1160             try
1161             {
1162                 webView.GoForward();
1163             }
1164             catch (Exception e)
1165             {
1166                 tlog.Debug(tag, e.Message.ToString());
1167                 Assert.Fail("Caught Exception : Failed!");
1168             }
1169
1170             tlog.Debug(tag, $"WebViewGoForward END (OK)");
1171         }
1172
1173         [Test]
1174         [Category("P1")]
1175         [Description("WebView CanGoBack.")]
1176         [Property("SPEC", "Tizen.NUI.WebView.CanGoBack M")]
1177         [Property("SPEC_URL", "-")]
1178         [Property("CRITERIA", "MR")]
1179         [Property("COVPARAM", "")]
1180         [Property("AUTHOR", "guowei.wang@samsung.com")]
1181         public void WebViewCanGoBack()
1182         {
1183             tlog.Debug(tag, $"WebViewCanGoBack START");
1184
1185             var result = webView.CanGoBack();
1186             tlog.Debug(tag, "CanGoBack : " + result);
1187
1188             tlog.Debug(tag, $"WebViewCanGoBack END (OK)");
1189         }
1190
1191         [Test]
1192         [Category("P1")]
1193         [Description("WebView CanGoForward.")]
1194         [Property("SPEC", "Tizen.NUI.WebView.CanGoForward M")]
1195         [Property("SPEC_URL", "-")]
1196         [Property("CRITERIA", "MR")]
1197         [Property("COVPARAM", "")]
1198         [Property("AUTHOR", "guowei.wang@samsung.com")]
1199         public void WebViewCanGoForward()
1200         {
1201             tlog.Debug(tag, $"WebViewCanGoForward START");
1202
1203             var result = webView.CanGoForward();
1204             tlog.Debug(tag, "CanGoForward : " + result);
1205
1206             tlog.Debug(tag, $"WebViewCanGoForward END (OK)");
1207         }
1208
1209         [Test]
1210         [Category("P1")]
1211         [Description("WebView EvaluateJavaScript.")]
1212         [Property("SPEC", "Tizen.NUI.WebView.EvaluateJavaScript M")]
1213         [Property("SPEC_URL", "-")]
1214         [Property("CRITERIA", "MR")]
1215         [Property("COVPARAM", "")]
1216         [Property("AUTHOR", "guowei.wang@samsung.com")]
1217         public void WebViewEvaluateJavaScript()
1218         {
1219             tlog.Debug(tag, $"WebViewEvaluateJavaScript START");
1220
1221             try
1222             {
1223                 webView.EvaluateJavaScript("<script type=\"text / javascript\">document.write(\"page\");</script>");
1224             }
1225             catch (Exception e)
1226             {
1227                 tlog.Debug(tag, e.Message.ToString());
1228                 Assert.Fail("Caught Exception : Failed!");
1229             }
1230
1231             tlog.Debug(tag, $"WebViewEvaluateJavaScript END (OK)");
1232         }
1233
1234         [Test]
1235         [Category("P1")]
1236         [Description("WebView AddJavaScriptMessageHandler.")]
1237         [Property("SPEC", "Tizen.NUI.WebView.AddJavaScriptMessageHandler M")]
1238         [Property("SPEC_URL", "-")]
1239         [Property("CRITERIA", "MR")]
1240         [Property("COVPARAM", "")]
1241         [Property("AUTHOR", "guowei.wang@samsung.com")]
1242         public void WebViewAddJavaScriptMessageHandler()
1243         {
1244             tlog.Debug(tag, $"WebViewAddJavaScriptMessageHandler START");
1245
1246             try
1247             {
1248                 webView.AddJavaScriptMessageHandler("AllowOrigin", JsCallback);
1249             }
1250             catch (Exception e)
1251             {
1252                 tlog.Debug(tag, e.Message.ToString());
1253                 Assert.Fail("Caught Exception : Failed!");
1254             }
1255
1256             tlog.Debug(tag, $"WebViewAddJavaScriptMessageHandler END (OK)");
1257         }
1258
1259         [Test]
1260         [Category("P1")]
1261         [Description("WebView RegisterJavaScriptAlertCallback.")]
1262         [Property("SPEC", "Tizen.NUI.WebView.RegisterJavaScriptAlertCallback M")]
1263         [Property("SPEC_URL", "-")]
1264         [Property("CRITERIA", "MR")]
1265         [Property("COVPARAM", "")]
1266         [Property("AUTHOR", "guowei.wang@samsung.com")]
1267         public void WebViewRegisterJavaScriptAlertCallback()
1268         {
1269             tlog.Debug(tag, $"WebViewRegisterJavaScriptAlertCallback START");
1270
1271             try
1272             {
1273                 webView.RegisterJavaScriptAlertCallback(JsCallback);
1274             }
1275             catch (Exception e)
1276             {
1277                 tlog.Debug(tag, e.Message.ToString());
1278                 Assert.Fail("Caught Exception : Failed!");
1279             }
1280
1281             tlog.Debug(tag, $"WebViewRegisterJavaScriptAlertCallback END (OK)");
1282         }
1283
1284         [Test]
1285         [Category("P1")]
1286         [Description("WebView RegisterJavaScriptConfirmCallback.")]
1287         [Property("SPEC", "Tizen.NUI.WebView.RegisterJavaScriptConfirmCallback M")]
1288         [Property("SPEC_URL", "-")]
1289         [Property("CRITERIA", "MR")]
1290         [Property("COVPARAM", "")]
1291         [Property("AUTHOR", "guowei.wang@samsung.com")]
1292         public void WebViewRegisterJavaScriptConfirmCallback()
1293         {
1294             tlog.Debug(tag, $"WebViewRegisterJavaScriptConfirmCallback START");
1295
1296             try
1297             {
1298                 webView.RegisterJavaScriptConfirmCallback(JsCallback);
1299             }
1300             catch (Exception e)
1301             {
1302                 tlog.Debug(tag, e.Message.ToString());
1303                 Assert.Fail("Caught Exception : Failed!");
1304             }
1305
1306             tlog.Debug(tag, $"WebViewRegisterJavaScriptConfirmCallback END (OK)");
1307         }
1308
1309         [Test]
1310         [Category("P1")]
1311         [Description("WebView RegisterJavaScriptPromptCallback.")]
1312         [Property("SPEC", "Tizen.NUI.WebView.RegisterJavaScriptPromptCallback M")]
1313         [Property("SPEC_URL", "-")]
1314         [Property("CRITERIA", "MR")]
1315         [Property("COVPARAM", "")]
1316         [Property("AUTHOR", "guowei.wang@samsung.com")]
1317         public void WebViewRegisterJavaScriptPromptCallback()
1318         {
1319             tlog.Debug(tag, $"WebViewRegisterJavaScriptPromptCallback START");
1320
1321             try
1322             {
1323                 webView.RegisterJavaScriptPromptCallback(PromptCallback);
1324             }
1325             catch (Exception e)
1326             {
1327                 tlog.Debug(tag, e.Message.ToString());
1328                 Assert.Fail("Caught Exception : Failed!");
1329             }
1330
1331             tlog.Debug(tag, $"WebViewRegisterJavaScriptPromptCallback END (OK)");
1332         }
1333
1334         [Test]
1335         [Category("P1")]
1336         [Description("WebView ClearAllTilesResources.")]
1337         [Property("SPEC", "Tizen.NUI.WebView.ClearAllTilesResources M")]
1338         [Property("SPEC_URL", "-")]
1339         [Property("CRITERIA", "MR")]
1340         [Property("COVPARAM", "")]
1341         [Property("AUTHOR", "guowei.wang@samsung.com")]
1342         public void WebViewClearAllTilesResources()
1343         {
1344             tlog.Debug(tag, $"WebViewClearAllTilesResources START");
1345
1346             try
1347             {
1348                 webView.ClearAllTilesResources();
1349             }
1350             catch (Exception e)
1351             {
1352                 tlog.Debug(tag, e.Message.ToString());
1353                 Assert.Fail("Caught Exception : Failed!");
1354             }
1355
1356             tlog.Debug(tag, $"WebViewClearAllTilesResources END (OK)");
1357         }
1358
1359         [Test]
1360         [Category("P1")]
1361         [Description("WebView ClearHistory.")]
1362         [Property("SPEC", "Tizen.NUI.WebView.ClearHistory M")]
1363         [Property("SPEC_URL", "-")]
1364         [Property("CRITERIA", "MR")]
1365         [Property("COVPARAM", "")]
1366         [Property("AUTHOR", "guowei.wang@samsung.com")]
1367         public void WebViewClearHistory()
1368         {
1369             tlog.Debug(tag, $"WebViewClearHistory START");
1370
1371             try
1372             {
1373                 webView.ClearHistory();
1374             }
1375             catch (Exception e)
1376             {
1377                 tlog.Debug(tag, e.Message.ToString());
1378                 Assert.Fail("Caught Exception : Failed!");
1379             }
1380
1381             tlog.Debug(tag, $"WebViewClearHistory END (OK)");
1382         }
1383
1384         [Test]
1385         [Category("P1")]
1386         [Description("WebView SetScaleFactor.")]
1387         [Property("SPEC", "Tizen.NUI.WebView.SetScaleFactor M")]
1388         [Property("SPEC_URL", "-")]
1389         [Property("CRITERIA", "MR")]
1390         [Property("COVPARAM", "")]
1391         [Property("AUTHOR", "guowei.wang@samsung.com")]
1392         public void WebViewSetScaleFactor()
1393         {
1394             tlog.Debug(tag, $"WebViewSetScaleFactor START");
1395
1396             try
1397             {
1398                 using (Vector2 point = new Vector2(1.0f, 1.0f))
1399                 {
1400                     webView.SetScaleFactor(0.2f, point);
1401
1402                     var result = webView.GetScaleFactor();
1403                     tlog.Debug(tag, "ScaleFactor : " + result);
1404                 }
1405             }
1406             catch (Exception e)
1407             {
1408                 tlog.Debug(tag, e.Message.ToString());
1409                 Assert.Fail("Caught Exception : Failed!");
1410             }
1411
1412             tlog.Debug(tag, $"WebViewSetScaleFactor END (OK)");
1413         }
1414
1415         [Test]
1416         [Category("P1")]
1417         [Description("WebView ActivateAccessibility.")]
1418         [Property("SPEC", "Tizen.NUI.WebView.ActivateAccessibility M")]
1419         [Property("SPEC_URL", "-")]
1420         [Property("CRITERIA", "MR")]
1421         [Property("COVPARAM", "")]
1422         [Property("AUTHOR", "guowei.wang@samsung.com")]
1423         public void WebViewActivateAccessibility()
1424         {
1425             tlog.Debug(tag, $"WebViewActivateAccessibility START");
1426
1427             try
1428             {
1429                 webView.ActivateAccessibility(false);
1430             }
1431             catch (Exception e)
1432             {
1433                 tlog.Debug(tag, e.Message.ToString());
1434                 Assert.Fail("Caught Exception : Failed!");
1435             }
1436
1437             tlog.Debug(tag, $"WebViewActivateAccessibility END (OK)");
1438         }
1439
1440         [Test]
1441         [Category("P1")]
1442         [Description("WebView HighlightText.")]
1443         [Property("SPEC", "Tizen.NUI.WebView.HighlightText M")]
1444         [Property("SPEC_URL", "-")]
1445         [Property("CRITERIA", "MR")]
1446         [Property("COVPARAM", "")]
1447         [Property("AUTHOR", "guowei.wang@samsung.com")]
1448         public void WebViewHighlightText()
1449         {
1450             tlog.Debug(tag, $"WebViewHighlightText START");
1451
1452             try
1453             {
1454                 webView.HighlightText("web", Tizen.NUI.BaseComponents.WebView.FindOption.AtWordStart, 3);
1455             }
1456             catch (Exception e)
1457             {
1458                 tlog.Debug(tag, e.Message.ToString());
1459                 Assert.Fail("Caught Exception : Failed!");
1460             }
1461
1462             tlog.Debug(tag, $"WebViewHighlightText END (OK)");
1463         }
1464
1465         [Test]
1466         [Category("P1")]
1467         [Description("WebView AddDynamicCertificatePath.")]
1468         [Property("SPEC", "Tizen.NUI.WebView.AddDynamicCertificatePath M")]
1469         [Property("SPEC_URL", "-")]
1470         [Property("CRITERIA", "MR")]
1471         [Property("COVPARAM", "")]
1472         [Property("AUTHOR", "guowei.wang@samsung.com")]
1473         public void WebViewAddDynamicCertificatePath()
1474         {
1475             tlog.Debug(tag, $"WebViewAddDynamicCertificatePath START");
1476
1477             try
1478             {
1479                 webView.AddDynamicCertificatePath("127.0.0.0", "/");
1480             }
1481             catch (Exception e)
1482             {
1483                 tlog.Debug(tag, e.Message.ToString());
1484                 Assert.Fail("Caught Exception : Failed!");
1485             }
1486
1487             tlog.Debug(tag, $"WebViewAddDynamicCertificatePath END (OK)");
1488         }
1489
1490         [Test]
1491         [Category("P1")]
1492         [Description("WebView CheckVideoPlayingAsynchronously.")]
1493         [Property("SPEC", "Tizen.NUI.WebView.CheckVideoPlayingAsynchronously M")]
1494         [Property("SPEC_URL", "-")]
1495         [Property("CRITERIA", "MR")]
1496         [Property("COVPARAM", "")]
1497         [Property("AUTHOR", "guowei.wang@samsung.com")]
1498         public void WebViewCheckVideoPlayingAsynchronously()
1499         {
1500             tlog.Debug(tag, $"WebViewCheckVideoPlayingAsynchronously START");
1501
1502             try
1503             {
1504                 webView.CheckVideoPlayingAsynchronously(VideoCallback);
1505             }
1506             catch (Exception e)
1507             {
1508                 tlog.Debug(tag, e.Message.ToString());
1509                 Assert.Fail("Caught Exception : Failed!");
1510             }
1511
1512             tlog.Debug(tag, $"WebViewCheckVideoPlayingAsynchronously END (OK)");
1513         }
1514
1515         [Test]
1516         [Category("P1")]
1517         [Description("WebView RegisterGeolocationPermissionCallback.")]
1518         [Property("SPEC", "Tizen.NUI.WebView.RegisterGeolocationPermissionCallback M")]
1519         [Property("SPEC_URL", "-")]
1520         [Property("CRITERIA", "MR")]
1521         [Property("COVPARAM", "")]
1522         [Property("AUTHOR", "guowei.wang@samsung.com")]
1523         public void WebViewRegisterGeolocationPermissionCallback()
1524         {
1525             tlog.Debug(tag, $"WebViewRegisterGeolocationPermissionCallback START");
1526
1527             try
1528             {
1529                 webView.RegisterGeolocationPermissionCallback(GeolocationCallback);
1530             }
1531             catch (Exception e)
1532             {
1533                 tlog.Debug(tag, e.Message.ToString());
1534                 Assert.Fail("Caught Exception : Failed!");
1535             }
1536
1537             tlog.Debug(tag, $"WebViewRegisterGeolocationPermissionCallback END (OK)");
1538         }
1539
1540         [Test]
1541         [Category("P1")]
1542         [Description("WebView ClearCache.")]
1543         [Property("SPEC", "Tizen.NUI.WebView.ClearCache M")]
1544         [Property("SPEC_URL", "-")]
1545         [Property("CRITERIA", "MR")]
1546         [Property("COVPARAM", "")]
1547         [Property("AUTHOR", "guowei.wang@samsung.com")]
1548         public void WebViewClearCache()
1549         {
1550             tlog.Debug(tag, $"WebViewClearCache START");
1551
1552             try
1553             {
1554                 webView.ClearCache();
1555             }
1556             catch (Exception e)
1557             {
1558                 tlog.Debug(tag, e.Message.ToString());
1559                 Assert.Fail("Caught Exception : Failed!");
1560             }
1561
1562             tlog.Debug(tag, $"WebViewClearCache END (OK)");
1563         }
1564
1565         [Test]
1566         [Category("P1")]
1567         [Description("WebView ClearCookies.")]
1568         [Property("SPEC", "Tizen.NUI.WebView.ClearCookies M")]
1569         [Property("SPEC_URL", "-")]
1570         [Property("CRITERIA", "MR")]
1571         [Property("COVPARAM", "")]
1572         [Property("AUTHOR", "guowei.wang@samsung.com")]
1573         public void WebViewClearCookies()
1574         {
1575             tlog.Debug(tag, $"WebViewClearCookies START");
1576
1577             try
1578             {
1579                 webView.ClearCookies();
1580             }
1581             catch (Exception e)
1582             {
1583                 tlog.Debug(tag, e.Message.ToString());
1584                 Assert.Fail("Caught Exception : Failed!");
1585             }
1586
1587             tlog.Debug(tag, $"WebViewClearCookies END (OK)");
1588         }
1589
1590         [Test]
1591         [Category("P1")]
1592         [Description("WebView DownCast.")]
1593         [Property("SPEC", "Tizen.NUI.WebView.DownCast M")]
1594         [Property("SPEC_URL", "-")]
1595         [Property("CRITERIA", "MR")]
1596         [Property("COVPARAM", "")]
1597         [Property("AUTHOR", "guowei.wang@samsung.com")]
1598         public void WebViewDownCast()
1599         {
1600             tlog.Debug(tag, $"WebViewDownCast START");
1601
1602             try
1603             {
1604                 Tizen.NUI.BaseComponents.WebView.DownCast(webView);
1605             }
1606             catch (Exception e)
1607             {
1608                 tlog.Debug(tag, e.Message.ToString());
1609                 Assert.Fail("Caught Exception : Failed!");
1610             }
1611
1612             tlog.Debug(tag, $"WebViewDownCast END (OK)");
1613         }
1614
1615         [Test]
1616         [Category("P1")]
1617         [Description("WebView Assign.")]
1618         [Property("SPEC", "Tizen.NUI.WebView.Assign M")]
1619         [Property("SPEC_URL", "-")]
1620         [Property("CRITERIA", "MR")]
1621         [Property("COVPARAM", "")]
1622         [Property("AUTHOR", "guowei.wang@samsung.com")]
1623         public void WebViewAssign()
1624         {
1625             tlog.Debug(tag, $"WebViewAssign START");
1626
1627             try
1628             {
1629                 webView.Assign(webView);
1630             }
1631             catch (Exception e)
1632             {
1633                 tlog.Debug(tag, e.Message.ToString());
1634                 Assert.Fail("Caught Exception : Failed!");
1635             }
1636
1637             tlog.Debug(tag, $"WebViewAssign END (OK)");
1638         }
1639
1640         [Test]
1641         [Category("P1")]
1642         [Description("WebView Dispose.")]
1643         [Property("SPEC", "Tizen.NUI.WebView.Dispose M")]
1644         [Property("SPEC_URL", "-")]
1645         [Property("CRITERIA", "MR")]
1646         [Property("COVPARAM", "")]
1647         [Property("AUTHOR", "guowei.wang@samsung.com")]
1648         public void WebViewDispose()
1649         {
1650             tlog.Debug(tag, $"WebViewDispose START");
1651
1652             var testingTarget = new MyWebView();
1653             Assert.IsNotNull(testingTarget, "null handle");
1654             Assert.IsInstanceOf<Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");
1655
1656             testingTarget.OnDispose(DisposeTypes.Explicit);
1657             //disposed
1658             testingTarget.OnDispose(DisposeTypes.Explicit);
1659
1660             tlog.Debug(tag, $"WebViewDispose END (OK)");
1661         }
1662
1663         private void OnLoadStarted(object sender, WebViewPageLoadEventArgs e) { }
1664         private void OnLoading(object sender, WebViewPageLoadEventArgs e) { }
1665         private void OnLoadFinished(object sender, WebViewPageLoadEventArgs e) { }
1666         private void OnLoadError(object sender, WebViewPageLoadErrorEventArgs e) { }
1667         private void OnEdgeReached(object sender, WebViewScrollEdgeReachedEventArgs e) { }
1668         private void OnUrlChange(object sender, WebViewUrlChangedEventArgs e) { }
1669         private void OnFormRepostPolicyDecide(object sender, WebViewFormRepostPolicyDecidedEventArgs e) { }
1670         private void OnFrameRender(object sender, EventArgs e) { }
1671         private void OnResponsePolicyDecide(object sender, WebViewPolicyDecidedEventArgs e) { }
1672         private void OnCertificateConfirme(object sender, WebViewCertificateReceivedEventArgs e) { }
1673         private void OnSslCertificateChange(object sender, WebViewCertificateReceivedEventArgs e) {  }
1674         private void OnHttpAuthRequeste(object sender, WebViewHttpAuthRequestedEventArgs e) { }
1675         private void OnConsoleMessageReceive(object sender, WebViewConsoleMessageReceivedEventArgs e) { }
1676     }
1677 }