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

Side by Side Diff: chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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 unified diff | Download patch
OLDNEW
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 EXPECT_FALSE(hostname.empty()); 127 EXPECT_FALSE(hostname.empty());
128 EXPECT_TRUE(ssl_info.is_valid()); 128 EXPECT_TRUE(ssl_info.is_valid());
129 CertificateErrorReporter::SendReport(type, hostname, ssl_info); 129 CertificateErrorReporter::SendReport(type, hostname, ssl_info);
130 } 130 }
131 131
132 private: 132 private:
133 scoped_ptr<net::URLRequest> CreateURLRequest( 133 scoped_ptr<net::URLRequest> CreateURLRequest(
134 net::URLRequestContext* context) override { 134 net::URLRequestContext* context) override {
135 return context->CreateRequest(GURL(std::string()), 135 return context->CreateRequest(GURL(std::string()),
136 net::DEFAULT_PRIORITY, 136 net::DEFAULT_PRIORITY,
137 NULL,
138 NULL); 137 NULL);
139 } 138 }
140 }; 139 };
141 140
142 static void DoReportIsSent() { 141 static void DoReportIsSent() {
143 net::TestURLRequestContext context; 142 net::TestURLRequestContext context;
144 SendingTestReporter reporter(&context); 143 SendingTestReporter reporter(&context);
145 SSLInfo info = GetGoodSSLInfo(); 144 SSLInfo info = GetGoodSSLInfo();
146 reporter.SendReport("mail.google.com", info); 145 reporter.SendReport("mail.google.com", info);
147 } 146 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 183 }
185 184
186 TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) { 185 TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) {
187 base::MessageLoopForIO loop; 186 base::MessageLoopForIO loop;
188 content::TestBrowserThread io_thread(BrowserThread::IO, &loop); 187 content::TestBrowserThread io_thread(BrowserThread::IO, &loop);
189 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent)); 188 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent));
190 loop.RunUntilIdle(); 189 loop.RunUntilIdle();
191 } 190 }
192 191
193 } // namespace chrome_browser_net 192 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/certificate_error_reporter.cc ('k') | chrome/browser/net/chrome_network_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698