Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: chrome/browser/ui/webui/options/certificate_manager_browsertest.cc

Issue 53763003: Initialize per-ChromeOS-user NSS slots and provide the functions to access them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix CertificateManagerBrowserTest Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5faef2495906eb1db258bb7d566cf2c6de57f3a2..d0fab46dab1bf52389e44b902a13cf7d82d5d6f3 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
@@ -46,10 +46,36 @@ class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest {
policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
}
+ void SetUpOnIOThread() {
+#if defined(OS_CHROMEOS)
+ test_nssdb_.reset(new crypto::ScopedTestNSSDB());
+#endif
+ }
+
+ void TearDownOnIOThread() {
+#if defined(OS_CHROMEOS)
+ test_nssdb_.reset();
+#endif
+ }
+
virtual void SetUpOnMainThread() OVERRIDE {
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&CertificateManagerBrowserTest::SetUpOnIOThread, this));
+ content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
+
content::RunAllPendingInMessageLoop();
}
+ virtual void CleanUpOnMainThread() OVERRIDE {
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&CertificateManagerBrowserTest::TearDownOnIOThread, this));
+ content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
+ }
+
#if defined(OS_CHROMEOS)
void LoadONCPolicy(const std::string& filename) {
const std::string& user_policy_blob =
@@ -86,7 +112,7 @@ class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest {
policy::MockConfigurationPolicyProvider provider_;
#if defined(OS_CHROMEOS)
policy::DevicePolicyCrosTestHelper device_policy_test_helper_;
- crypto::ScopedTestNSSDB test_nssdb_;
+ scoped_ptr<crypto::ScopedTestNSSDB> test_nssdb_;
#endif
};
« no previous file with comments | « chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698