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

Side by Side Diff: content/browser/ssl/ssl_host_state_unittest.cc

Issue 10384211: Add SSlHostState::Clear() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove #ifdef's, add test code Created 8 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
« no previous file with comments | « content/browser/ssl/ssl_host_state.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "content/browser/ssl/ssl_host_state.h" 5 #include "content/browser/ssl/ssl_host_state.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace { 8 namespace {
9 9
10 // Certificates for test data. They're obtained with: 10 // Certificates for test data. They're obtained with:
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 net::CertPolicy::ALLOWED); 144 net::CertPolicy::ALLOWED);
145 145
146 state.DenyCertForHost(google_cert.get(), "example.com"); 146 state.DenyCertForHost(google_cert.get(), "example.com");
147 147
148 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "www.google.com"), 148 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "www.google.com"),
149 net::CertPolicy::ALLOWED); 149 net::CertPolicy::ALLOWED);
150 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "google.com"), 150 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "google.com"),
151 net::CertPolicy::UNKNOWN); 151 net::CertPolicy::UNKNOWN);
152 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "example.com"), 152 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "example.com"),
153 net::CertPolicy::DENIED); 153 net::CertPolicy::DENIED);
154
155 state.Clear();
156
157 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "www.google.com"),
158 net::CertPolicy::UNKNOWN);
159 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "google.com"),
160 net::CertPolicy::UNKNOWN);
161 EXPECT_EQ(state.QueryPolicy(google_cert.get(), "example.com"),
162 net::CertPolicy::UNKNOWN);
163
154 } 164 }
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_host_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698