diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 07:58:49 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 07:58:49 +0000 |
commit | 9abfd693bdf2ec9791a1c10dab5c10c495a023fd (patch) | |
tree | 730358ba73af168f1830788e355635e6cf17a9a3 /net/base/transport_security_state_unittest.cc | |
parent | eed24562b1e6a431fc726195e1114eed01b1694f (diff) | |
download | chromium_src-9abfd693bdf2ec9791a1c10dab5c10c495a023fd.zip chromium_src-9abfd693bdf2ec9791a1c10dab5c10c495a023fd.tar.gz chromium_src-9abfd693bdf2ec9791a1c10dab5c10c495a023fd.tar.bz2 |
Use a scoped class for managing test root certs in unit tests
BUG=none
TEST=none
R=rtenneti@chromium.org
Review URL: http://codereview.chromium.org/9605026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/transport_security_state_unittest.cc')
-rw-r--r-- | net/base/transport_security_state_unittest.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/base/transport_security_state_unittest.cc b/net/base/transport_security_state_unittest.cc index eb0b1a5..3cb0f9a 100644 --- a/net/base/transport_security_state_unittest.cc +++ b/net/base/transport_security_state_unittest.cc @@ -281,7 +281,7 @@ TEST_F(TransportSecurityStateTest, ValidPinsHeaders) { scoped_refptr<X509Certificate> root_cert = ImportCertFromFile(certs_dir, "2048-rsa-root.pem"); ASSERT_NE(static_cast<X509Certificate*>(NULL), root_cert); - TestRootCerts::GetInstance()->Add(root_cert.get()); + ScopedTestRoot scoped_root(root_cert); // Verify has the side-effect of populating public_key_hashes, which // ParsePinsHeader needs. (It wants to check pins against the validated @@ -347,8 +347,6 @@ TEST_F(TransportSecurityStateTest, ValidPinsHeaders) { backup_pin + ";" + good_pin + "; ", ssl_info, &state)); EXPECT_EQ(state.max_age, TransportSecurityState::kMaxHSTSAgeSecs); - - TestRootCerts::GetInstance()->Clear(); } TEST_F(TransportSecurityStateTest, SimpleMatches) { |