public async Task DecimalResultConverted()
        {
            using (var browser = new Util.Browser())
            {
                browser.Repository.AddBinding("test", new TestClass());

                await browser.LoadAsync(url);

                await browser.RunTest("testDecimalResult");
            }
        }
Exemplo n.º 2
0
        public async Task TestCallbackBoundToJSObject()
        {
            using (var browser = new Util.Browser())
            {
                var obj = new TestClass();
                browser.Repository.AddBinding("test", obj);

                await browser.LoadAsync(url);

                await browser.RunTest("testCallbackBound");
            }
        }
Exemplo n.º 3
0
        public async Task ReturnValuePropertiesExtracted()
        {
            using (var browser = new Util.Browser())
            {
                var obj = new TestClass();
                browser.Repository.AddBinding("bindingTest3", obj);

                await browser.LoadAsync(url);

                await browser.RunTest("returnValuePropertiesExtracted");
            }
        }
Exemplo n.º 4
0
        public async Task CallbackValueBound()
        {
            using (var browser = new Util.Browser())
            {
                var obj = new TestClass();
                browser.Repository.AddBinding("bindingTest2", obj);

                await browser.LoadAsync(url);

                await browser.RunTest("callbackValueBound");
            }
        }
Exemplo n.º 5
0
        public async Task TestCallbackDispose()
        {
            using (var browser = new Util.Browser())
            {
                var obj = new TestClass();
                browser.Repository.AddBinding("test", obj);

                await browser.LoadAsync(url);

                await browser.RunTest("testCallbackDispose");

                await Assert.ThrowsAsync <Exception>(() => new Callback <CefValue>(obj.Id, browser.BindingHost.CallbackExecutor,
                                                                                   contet => { }).ExecuteAsync());
            }
        }
Exemplo n.º 6
0
        public async Task TestPopupCache()
        {
            using (var browser = new Util.Browser())
            {
                var popupBrowserTask = new TaskCompletionSource <Util.Browser>();
                browser.NewBrowser += b =>
                {
                    popupBrowserTask.TrySetResult(b);
                    b.Repository.AddBinding("cachetest4", new TestObject(2));
                };

                browser.Repository.AddBinding("cachetest4", new TestObject(1));

                await browser.LoadAsync(url);

                await browser.RunTest("testCachePerBrowser");
            }
        }