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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 | Annotate | Revision Log
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 TEST(ChromeFraudulentCertificateReporterTest, GoodBadInfo) { 178 TEST(ChromeFraudulentCertificateReporterTest, GoodBadInfo) {
179 SSLInfo good = GetGoodSSLInfo(); 179 SSLInfo good = GetGoodSSLInfo();
180 EXPECT_TRUE(IsGoodSSLInfo(good)); 180 EXPECT_TRUE(IsGoodSSLInfo(good));
181 181
182 SSLInfo bad = GetBadSSLInfo(); 182 SSLInfo bad = GetBadSSLInfo();
183 EXPECT_FALSE(IsGoodSSLInfo(bad)); 183 EXPECT_FALSE(IsGoodSSLInfo(bad));
184 } 184 }
185 185
186 TEST(ChromeFraudulentCertificateReporterTest, ReportIsSent) { 186 TEST(ChromeFraudulentCertificateReporterTest, ReportIsSent) {
187 MessageLoop loop(MessageLoop::TYPE_IO); 187 base::MessageLoop loop(base::MessageLoop::TYPE_IO);
188 content::TestBrowserThread io_thread(BrowserThread::IO, &loop); 188 content::TestBrowserThread io_thread(BrowserThread::IO, &loop);
189 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsSent)); 189 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsSent));
190 loop.RunUntilIdle(); 190 loop.RunUntilIdle();
191 } 191 }
192 192
193 TEST(ChromeFraudulentCertificateReporterTest, MockReportIsSent) { 193 TEST(ChromeFraudulentCertificateReporterTest, MockReportIsSent) {
194 MessageLoop loop(MessageLoop::TYPE_IO); 194 base::MessageLoop loop(base::MessageLoop::TYPE_IO);
195 content::TestBrowserThread io_thread(BrowserThread::IO, &loop); 195 content::TestBrowserThread io_thread(BrowserThread::IO, &loop);
196 loop.PostTask(FROM_HERE, base::Bind(&DoMockReportIsSent)); 196 loop.PostTask(FROM_HERE, base::Bind(&DoMockReportIsSent));
197 loop.RunUntilIdle(); 197 loop.RunUntilIdle();
198 } 198 }
199 199
200 TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) { 200 TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) {
201 MessageLoop loop(MessageLoop::TYPE_IO); 201 base::MessageLoop loop(base::MessageLoop::TYPE_IO);
202 content::TestBrowserThread io_thread(BrowserThread::IO, &loop); 202 content::TestBrowserThread io_thread(BrowserThread::IO, &loop);
203 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent)); 203 loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent));
204 loop.RunUntilIdle(); 204 loop.RunUntilIdle();
205 } 205 }
206 206
207 } // namespace chrome_browser_net 207 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.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