I think that it is possible. Some peoples exactly using CEF for this, as i know.
But i' doesn't hear about ready to use solution. May be Selenium it is exactly what you want?
Pavel wrote:1. load some html into browser (or alternatively some url)
It can be done with CEF easily. Check documentation, and methods like LoadUrl / LoadString. As for me is better write own scheme handler and load anything via urls.
Pavel wrote:2. test some assertions about DOM model in javascript
You can visit DOM with CEF (only from renderer process (of course it will available from browser process in single process mode)).
But as for me - more easily inject you minimal testing JS framework in testing page and call it from you tests. It must be not so hard, and much easier than using CEF DOM API.
Pavel wrote:No windows should be displayed, everything should run in background threads. Can I achieve this with CefGlue? If so, could you please provide some example code?
1. Using off-screen rendering (currently available only with CEF 1)...
2. Just hiding windows (may affect on layouting, but in general it must work)... JS alerts/dialogs can be handled on to auto answering via CEF.
You need find way to initalize cef runtime and then just create / drop browsers when you need.
I suggest start from examine test application, and try to integrate with you testing framework.
Sorry, but we doesn't use mstest / xunit / nunit, so i can't say what concrete steps you need.
But mstest have AssemblyInitialize / AssemblyCleanup attributes, so it is looks as can be used, but i'm never try it.
Also i do something like before with nunit and cefsharp, so it will possible and not so hard.
May be have sense check
CefSharp.Test as starting point.