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/net/chrome_fraudulent_certificate_reporter.h" | 5 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "chrome/browser/net/chrome_url_request_context.h" | 15 #include "chrome/browser/net/chrome_url_request_context.h" |
16 #include "content/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 #include "net/base/cert_test_util.h" | 17 #include "net/base/cert_test_util.h" |
18 #include "net/base/ssl_info.h" | 18 #include "net/base/ssl_info.h" |
19 #include "net/base/transport_security_state.h" | 19 #include "net/base/transport_security_state.h" |
20 #include "net/base/x509_certificate.h" | 20 #include "net/base/x509_certificate.h" |
21 #include "net/url_request/fraudulent_certificate_reporter.h" | 21 #include "net/url_request/fraudulent_certificate_reporter.h" |
22 #include "net/url_request/url_request.h" | 22 #include "net/url_request/url_request.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 using content::BrowserThread; | 25 using content::BrowserThread; |
26 using net::SSLInfo; | 26 using net::SSLInfo; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) { | 196 TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) { |
197 MessageLoop loop(MessageLoop::TYPE_IO); | 197 MessageLoop loop(MessageLoop::TYPE_IO); |
198 content::TestBrowserThread io_thread(BrowserThread::IO, &loop); | 198 content::TestBrowserThread io_thread(BrowserThread::IO, &loop); |
199 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent)); | 199 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent)); |
200 loop.RunAllPending(); | 200 loop.RunAllPending(); |
201 } | 201 } |
202 | 202 |
203 } // namespace chrome_browser_net | 203 } // namespace chrome_browser_net |
OLD | NEW |