OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
11 #include "content/public/test/test_browser_thread.h" | 11 #include "content/public/test/test_browser_thread.h" |
12 #include "net/base/server_bound_cert_service.h" | 12 #include "net/ssl/server_bound_cert_service.h" |
13 #include "net/url_request/url_request_context.h" | 13 #include "net/url_request/url_request_context.h" |
14 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 | 18 |
19 class BrowsingDataServerBoundCertHelperTest | 19 class BrowsingDataServerBoundCertHelperTest |
20 : public testing::Test, | 20 : public testing::Test, |
21 public net::SSLConfigService::Observer { | 21 public net::SSLConfigService::Observer { |
22 public: | 22 public: |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 new CannedBrowsingDataServerBoundCertHelper()); | 173 new CannedBrowsingDataServerBoundCertHelper()); |
174 | 174 |
175 ASSERT_TRUE(helper->empty()); | 175 ASSERT_TRUE(helper->empty()); |
176 helper->AddServerBoundCert(net::ServerBoundCertStore::ServerBoundCert( | 176 helper->AddServerBoundCert(net::ServerBoundCertStore::ServerBoundCert( |
177 origin, net::CLIENT_CERT_RSA_SIGN, base::Time(), base::Time(), "key", | 177 origin, net::CLIENT_CERT_RSA_SIGN, base::Time(), base::Time(), "key", |
178 "cert")); | 178 "cert")); |
179 ASSERT_FALSE(helper->empty()); | 179 ASSERT_FALSE(helper->empty()); |
180 helper->Reset(); | 180 helper->Reset(); |
181 ASSERT_TRUE(helper->empty()); | 181 ASSERT_TRUE(helper->empty()); |
182 } | 182 } |
OLD | NEW |