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

Unified Diff: net/base/keygen_handler_unittest.cc

Issue 1730001: Enable Chrome OS to load the user's nssdb later. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months 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 | « net/base/keygen_handler_nss.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/keygen_handler_unittest.cc
===================================================================
--- net/base/keygen_handler_unittest.cc (revision 45593)
+++ net/base/keygen_handler_unittest.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/base64.h"
#include "base/logging.h"
+#include "base/nss_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
@@ -28,7 +29,19 @@
return result;
}
-TEST(KeygenHandlerTest, FLAKY_SmokeTest) {
+class KeygenHandlerTest : public ::testing::Test {
+ public:
+ KeygenHandlerTest() {}
+ virtual ~KeygenHandlerTest() {}
+
+ virtual void SetUp() {
+#if defined(OS_CHROMEOS)
+ base::OpenPersistentNSSDB();
+#endif
+ }
+};
+
+TEST_F(KeygenHandlerTest, FLAKY_SmokeTest) {
KeygenHandler handler(2048, "some challenge");
handler.set_stores_key(false); // Don't leave the key-pair behind
std::string result = handler.GenKeyAndSignChallenge();
@@ -65,7 +78,7 @@
// openssl asn1parse -inform DER
}
-TEST(KeygenHandlerTest, Cache) {
+TEST_F(KeygenHandlerTest, Cache) {
KeygenHandler::Cache* cache = KeygenHandler::Cache::GetInstance();
KeygenHandler::KeyLocation location1;
KeygenHandler::KeyLocation location2;
« no previous file with comments | « net/base/keygen_handler_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698