diff options
| author | juanlang@google.com <juanlang@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 17:32:04 +0000 |
|---|---|---|
| committer | juanlang@google.com <juanlang@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 17:32:04 +0000 |
| commit | 7047bbb6d9acd6bf67cae14aebe202d3c8e542ce (patch) | |
| tree | 2703ac05611bc5951ad5547328694d6581ca502b /chrome/browser/browsing_data | |
| parent | 9ad935f7cd41740e4db1a708a1ab78b562801091 (diff) | |
| download | chromium_src-7047bbb6d9acd6bf67cae14aebe202d3c8e542ce.zip chromium_src-7047bbb6d9acd6bf67cae14aebe202d3c8e542ce.tar.gz chromium_src-7047bbb6d9acd6bf67cae14aebe202d3c8e542ce.tar.bz2 | |
Remove requested types from the server bound cert service: it only
supports a single type.
BUG=259097
Review URL: https://chromiumcodereview.appspot.com/20456002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216223 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data')
3 files changed, 6 insertions, 36 deletions
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc index ae24390..3de958d 100644 --- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc @@ -284,8 +284,10 @@ class RemoveServerBoundCertTester : public net::SSLConfigService::Observer { base::Time creation_time, base::Time expiration_time) { GetCertStore()->SetServerBoundCert(server_identifier, - net::CLIENT_CERT_RSA_SIGN, creation_time, - expiration_time, "a", "b"); + creation_time, + expiration_time, + "a", + "b"); } // Add a server bound cert for |server|, with the current time as the diff --git a/chrome/browser/browsing_data/browsing_data_server_bound_cert_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_server_bound_cert_helper_unittest.cc index 4a12c5a..a95405e 100644 --- a/chrome/browser/browsing_data/browsing_data_server_bound_cert_helper_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_server_bound_cert_helper_unittest.cc @@ -39,11 +39,9 @@ class BrowsingDataServerBoundCertHelperTest net::ServerBoundCertStore* cert_store = context->server_bound_cert_service()->GetCertStore(); cert_store->SetServerBoundCert("https://www.google.com:443", - net::CLIENT_CERT_RSA_SIGN, base::Time(), base::Time(), "key", "cert"); cert_store->SetServerBoundCert("https://www.youtube.com:443", - net::CLIENT_CERT_RSA_SIGN, base::Time(), base::Time(), "key", "cert"); } @@ -131,34 +129,6 @@ TEST_F(BrowsingDataServerBoundCertHelperTest, DeleteCert) { ASSERT_EQ(0UL, server_bound_cert_list_.size()); } -TEST_F(BrowsingDataServerBoundCertHelperTest, CannedUnique) { - std::string origin = "https://www.google.com:443"; - - scoped_refptr<CannedBrowsingDataServerBoundCertHelper> helper( - new CannedBrowsingDataServerBoundCertHelper()); - - ASSERT_TRUE(helper->empty()); - helper->AddServerBoundCert(net::ServerBoundCertStore::ServerBoundCert( - origin, net::CLIENT_CERT_RSA_SIGN, base::Time(), base::Time(), "key", - "cert")); - helper->AddServerBoundCert(net::ServerBoundCertStore::ServerBoundCert( - origin, net::CLIENT_CERT_ECDSA_SIGN, base::Time(), base::Time(), "key", - "cert")); - - helper->StartFetching( - base::Bind(&BrowsingDataServerBoundCertHelperTest::FetchCallback, - base::Unretained(this))); - base::RunLoop().RunUntilIdle(); - - ASSERT_EQ(1UL, server_bound_cert_list_.size()); - net::ServerBoundCertStore::ServerBoundCert& cert = - server_bound_cert_list_.front(); - - EXPECT_EQ("https://www.google.com:443", cert.server_identifier()); - EXPECT_EQ(net::CLIENT_CERT_ECDSA_SIGN, cert.type()); - EXPECT_EQ(0, ssl_config_changed_count_); -} - TEST_F(BrowsingDataServerBoundCertHelperTest, CannedEmpty) { std::string origin = "https://www.google.com"; @@ -167,8 +137,7 @@ TEST_F(BrowsingDataServerBoundCertHelperTest, CannedEmpty) { ASSERT_TRUE(helper->empty()); helper->AddServerBoundCert(net::ServerBoundCertStore::ServerBoundCert( - origin, net::CLIENT_CERT_RSA_SIGN, base::Time(), base::Time(), "key", - "cert")); + origin, base::Time(), base::Time(), "key", "cert")); ASSERT_FALSE(helper->empty()); helper->Reset(); ASSERT_TRUE(helper->empty()); diff --git a/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc b/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc index 6cb78ed..85a02b9 100644 --- a/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc +++ b/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc @@ -28,8 +28,7 @@ void MockBrowsingDataServerBoundCertHelper::AddServerBoundCertSample( DCHECK(server_bound_certs_.find(server_id) == server_bound_certs_.end()); server_bound_cert_list_.push_back( net::ServerBoundCertStore::ServerBoundCert( - server_id, net::CLIENT_CERT_ECDSA_SIGN, - base::Time(), base::Time(), "key", "cert")); + server_id, base::Time(), base::Time(), "key", "cert")); server_bound_certs_[server_id] = true; } |
