In https://github.com/electron/electron/commit/7613afe6d70eadd7446db921918dca086cd324c0 I had to disable the check that validates that the constructor is called 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
CertificateManagerModel* model,
    const base::DictionaryValue& options) {
  std::string file_data, cert_path;
  base::string16 password;
  net::CertificateList imported_certs;
  int rv = -1;
  options.GetString("certificate", &cert_path);
  options.GetString("password", &password);
  if (!cert_path.empty()) {
    if (base::ReadFileToString(base::FilePath(cert_path), &file_data)) {
      auto module = model->cert_db()->GetPrivateSlot();
      rv = model->ImportFromPKCS12(module.get(),
                                   file_data,
                                   password,
                                   true,
                                   &imported_certs);
      if (imported_certs.size() > 1) {
        auto it = imported_certs.begin();
        ++it;  
        for (; it != imported_certs.end(); ++it)
          rv &= model->SetCertTrust(it->get(),
                                    net::CA_CERT,
                                    net::NSSCertDatabase::TRUSTED_SSL);
      }
    }
  }
  return rv;
}
#endif
void OnIconDataAvailable(v8::Isolate* isolate,