Beispiel #1
0
        private void OnSecurityOriginListAcquired(WebSecurityOriginList list)
        {
            WebSecurityOrigin origin = list.GetItemAtIndex(0);

            tlog.Debug(tag, "security origin, Host : " + origin.Host);
            tlog.Debug(tag, "security origin, Protocol : " + origin.Protocol);
        }
Beispiel #2
0
        public void WebContextDeleteWebDatabase()
        {
            tlog.Debug(tag, $"WebContextDeleteWebDatabase START");

            var testingTarget = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai");

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <Tizen.NUI.BaseComponents.WebView>(testingTarget, "Should return WebView instance.");

            var context = testingTarget.Context;

            try
            {
                using (WebSecurityOrigin origin = new WebSecurityOrigin(testingTarget.SwigCPtr.Handle, false))
                {
                    context.DeleteWebDatabase(origin);
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception :  Failed!");
            }

            testingTarget.ClearCache();
            testingTarget.ClearCookies();

            context.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"WebContextDeleteWebDatabase END (OK)");
        }
Beispiel #3
0
        public void WebSecurityOriginConstructor()
        {
            tlog.Debug(tag, $"WebSecurityOriginConstructor START");

            using (Tizen.NUI.BaseComponents.WebView webview = new Tizen.NUI.BaseComponents.WebView("Shanghai", "Asia/Shanghai"))
            {
                var testingTarget = new WebSecurityOrigin(webview.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "null handle");
                Assert.IsInstanceOf <WebSecurityOrigin>(testingTarget, "Should return WebSecurityOrigin instance.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"WebSecurityOriginConstructor END (OK)");
        }
Beispiel #4
0
        private void OnSecurityOriginListAcquired(WebSecurityOriginList list)
        {
            Log.Info("WebView", $"------------security origin, count: {list.ItemCount}-------");
            for (uint i = 0; i < list.ItemCount; i++)
            {
                WebSecurityOrigin origin = list.GetItemAtIndex(i);
                Log.Info("WebView", $"------------security origin, Host: {origin.Host}-------");
                Log.Info("WebView", $"------------security origin, Protocol: {origin.Protocol}-------");
            }

            if (list.ItemCount > 0)
            {
                WebSecurityOrigin origin = list.GetItemAtIndex(0);
                simpleWebView.Context.GetWebStorageUsageForOrigin(origin, OnStorageUsageAcquired);
                simpleWebView.Context.DeleteApplicationCache(origin);
                simpleWebView.Context.DeleteWebDatabase(origin);
                simpleWebView.Context.DeleteWebStorage(origin);
            }
        }
 public void decidePolicyForGeolocationRequest(WebView sender, webFrame frame, WebSecurityOrigin origin, IWebGeolocationPolicyListener listener)
 {
     if (GeolocationReq(sender, frame, origin) == true)
     {
         if (listener != null)
         {
             listener.allow();
         }
     }
     else
         listener.deny();
 }
 public void exceededDatabaseQuota(WebView sender, webFrame frame, WebSecurityOrigin origin, string databaseIdentifier)
 {
     
 }
 public void decidePolicyForGeolocationRequest(WebView sender, webFrame frame, WebSecurityOrigin origin, IWebGeolocationPolicyListener listener)
 {
     if (GeolocationReq(sender, frame, origin) == true)
     {
         if (listener != null)
         {
             listener.allow();
         }
     }
     else
     {
         listener.deny();
     }
 }
 public void exceededDatabaseQuota(WebView sender, webFrame frame, WebSecurityOrigin origin, string databaseIdentifier)
 {
 }