| Index: chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
|
| diff --git a/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc b/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
|
| index 68e897b7db788e0c8ffd3c309b661de0d9c6b593..4fa718678e1cb2a20cb8a3a1f6189042e49a6a8a 100644
|
| --- a/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
|
| +++ b/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
|
| @@ -22,7 +22,9 @@
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h"
|
| -#include "chrome/browser/chromeos/policy/network_configuration_updater.h"
|
| +#include "chrome/browser/chromeos/policy/user_network_configuration_updater.h"
|
| +#include "chrome/browser/chromeos/policy/user_network_configuration_updater_factory.h"
|
| +#include "chrome/browser/net/nss_context.h"
|
| #include "chromeos/network/onc/onc_test_utils.h"
|
| #include "crypto/nss_util.h"
|
| #endif
|
| @@ -63,6 +65,17 @@ class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest {
|
| content::BrowserThread::IO,
|
| FROM_HERE,
|
| base::Bind(&CertificateManagerBrowserTest::SetUpOnIOThread, this));
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| + // Certificates will fail to be imported if the network configuration
|
| + // updater does not have the cert database set.
|
| + GetNSSCertDatabaseForProfile(
|
| + browser()->profile(),
|
| + base::Bind(
|
| + &CertificateManagerBrowserTest::SetNetworkConfigurationUpdaterDB,
|
| + base::Unretained(this)));
|
| +#endif
|
| +
|
| content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
|
|
|
| content::RunAllPendingInMessageLoop();
|
| @@ -77,6 +90,11 @@ class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest {
|
| }
|
|
|
| #if defined(OS_CHROMEOS)
|
| + void SetNetworkConfigurationUpdaterDB(net::NSSCertDatabase* database) {
|
| + policy::UserNetworkConfigurationUpdaterFactory::GetForProfile(
|
| + browser()->profile())->SetCertDatabase(database);
|
| + }
|
| +
|
| void LoadONCPolicy(const std::string& filename) {
|
| const std::string& user_policy_blob =
|
| chromeos::onc::test_utils::ReadTestData(filename);
|
|
|