In https://github.com/electron/electron/commit/7613afe6d70eadd7446db921918dca086cd324c0 I had to disable the check that validates that the call is made on the right thread, because the check fails when the tests run.

Let's make sure the check doesn't fail and re-enable it. Or refactor so that the thread affinity is not required and remove the check.
atom/browser/api/atom_api_app.cc
const GURL& target_url,
    const std::string& frame_name,
    WindowOpenDisposition disposition,
    const std::vector<std::string>& features,
    const scoped_refptr<content::ResourceRequestBody>& body,
    content::RenderFrameHost* opener) {
  v8::Locker locker(isolate());
  v8::HandleScope handle_scope(isolate());
  content::WebContents* web_contents =
      content::WebContents::FromRenderFrameHost(opener);
  if (web_contents) {
    auto api_web_contents = WebContents::CreateFrom(isolate(), web_contents);
    api_web_contents->OnCreateWindow(target_url,
                                     frame_name,
                                     disposition,
                                     features,
                                     body);
  }
}
void App::AllowCertificateError(