public async Task Test_HTMLApp_Start_Should_Create_Session() { HTMLApp target = null; IDispatcher disp = await Task.Run(() => { target = new HTMLApp(); return(new WPFUIDispatcher(target.Dispatcher)); }); Task.Run(() => { Thread.Sleep(1000); CefCoreSessionSingleton.Session.Should().NotBeNull(); disp.Run(() => target.Shutdown(0)); }); disp.Run(() => target.Run()); }
public async Task Test_HTMLApp_Start_Should_Create_Session() { HTMLApp target = null; IDispatcher disp = await Task.Run(() => { target = new HTMLApp(); return new WPFUIDispatcher(target.Dispatcher); }); Task.Run(() => { Thread.Sleep(1000); CefCoreSessionSingleton.Session.Should().NotBeNull(); disp.Run(() => target.Shutdown(0)); }); disp.Run(() => target.Run()); }
public async Task Test_HTMLApp_Start_Should_not_Override_Session() { using (var ctx = new EnvironmentBuilder()) { HTMLApp target = null; IDispatcher disp = await Task.Run(() => { target = new HTMLApp(); return(new WPFUIDispatcher(target.Dispatcher)); }); Task.Run(() => { Thread.Sleep(1000); CefCoreSessionSingleton.Session.Should().Be(ctx.Session); disp.Run(() => target.Shutdown(0)); }); disp.Run(() => target.Run()); } }
public async Task Test_HTMLApp_Start_Should_not_Override_Session() { using (var ctx = new EnvironmentBuilder()) { HTMLApp target = null; IDispatcher disp = await Task.Run(() => { target = new HTMLApp(); return new WPFUIDispatcher(target.Dispatcher); }); Task.Run(() => { Thread.Sleep(1000); CefCoreSessionSingleton.Session.Should().Be(ctx.Session); disp.Run(() => target.Shutdown(0)); }); disp.Run(() => target.Run()); } }