Exemplo n.º 1
0
        public async Task WebViewIsNotDisposedWhenUnloaded()
        {
            await Run(async() => {
                var taskCompletionSource = new TaskCompletionSource <bool>();
                var view       = new WebViewControl.WebView();
                view.Disposed += delegate {
                    taskCompletionSource.SetResult(true);
                };

                var window = new Window {
                    Title   = CurrentTestName,
                    Content = view
                };

                try {
                    window.Show();
                    window.Content = null;
                    Assert.IsFalse(taskCompletionSource.Task.IsCompleted);

                    window.Content = view;
                    window.Close();
                    var disposed = await taskCompletionSource.Task;
                    Assert.IsTrue(disposed);
                } finally {
                    window.Close();
                }
            });
        }
Exemplo n.º 2
0
 public CefMenuHandler(WebView webView)
 {
     OwnerWebView = webView;
 }
Exemplo n.º 3
0
 public CefLifeSpanHandler(WebView webView)
 {
     OwnerWebView = webView;
 }
 public InternalFocusHandler(WebView webView)
 {
     OwnerWebView = webView;
 }
Exemplo n.º 5
0
 public CefDownloadHandler(WebView owner)
 {
     OwnerWebView = owner;
 }
Exemplo n.º 6
0
 public CefRequestHandler(WebView webView)
 {
     OwnerWebView = webView;
 }
 public InternalRequestHandler(WebView webView)
 {
     OwnerWebView           = webView;
     ResourceRequestHandler = new InternalResourceRequestHandler(OwnerWebView);
 }
Exemplo n.º 8
0
 public JavascriptExecutor(WebView ownerWebView)
 {
     OwnerWebView = ownerWebView;
     OwnerWebView.JavascriptContextCreated += OnJavascriptContextCreated;
     OwnerWebView.RenderProcessCrashed     += StopFlush;
 }