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

Side by Side Diff: content/browser/frame_host/navigation_entry_impl_unittest.cc

Issue 2400673003: Remove SSLStatus::security_style member and content::SecurityStyle (Closed)
Patch Set: more curly braces Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/strings/string16.h" 5 #include "base/strings/string16.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/frame_host/navigation_entry_impl.h" 10 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Test Favicon inner class construction. 131 // Test Favicon inner class construction.
132 TEST_F(NavigationEntryTest, NavigationEntryFavicons) { 132 TEST_F(NavigationEntryTest, NavigationEntryFavicons) {
133 EXPECT_EQ(GURL(), entry1_->GetFavicon().url); 133 EXPECT_EQ(GURL(), entry1_->GetFavicon().url);
134 EXPECT_FALSE(entry1_->GetFavicon().valid); 134 EXPECT_FALSE(entry1_->GetFavicon().valid);
135 } 135 }
136 136
137 // Test SSLStatus inner class 137 // Test SSLStatus inner class
138 TEST_F(NavigationEntryTest, NavigationEntrySSLStatus) { 138 TEST_F(NavigationEntryTest, NavigationEntrySSLStatus) {
139 // Default (unknown) 139 // Default (unknown)
140 EXPECT_EQ(SECURITY_STYLE_UNKNOWN, entry1_->GetSSL().security_style); 140 EXPECT_FALSE(entry1_->GetSSL().initialized);
141 EXPECT_EQ(SECURITY_STYLE_UNKNOWN, entry2_->GetSSL().security_style); 141 EXPECT_FALSE(entry2_->GetSSL().initialized);
142 EXPECT_FALSE(!!entry1_->GetSSL().certificate); 142 EXPECT_FALSE(!!entry1_->GetSSL().certificate);
143 EXPECT_EQ(0U, entry1_->GetSSL().cert_status); 143 EXPECT_EQ(0U, entry1_->GetSSL().cert_status);
144 EXPECT_EQ(-1, entry1_->GetSSL().security_bits); 144 EXPECT_EQ(-1, entry1_->GetSSL().security_bits);
145 int content_status = entry1_->GetSSL().content_status; 145 int content_status = entry1_->GetSSL().content_status;
146 EXPECT_FALSE(!!(content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT)); 146 EXPECT_FALSE(!!(content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT));
147 EXPECT_FALSE(!!(content_status & SSLStatus::RAN_INSECURE_CONTENT)); 147 EXPECT_FALSE(!!(content_status & SSLStatus::RAN_INSECURE_CONTENT));
148 } 148 }
149 149
150 // Test other basic accessors 150 // Test other basic accessors
151 TEST_F(NavigationEntryTest, NavigationEntryAccessors) { 151 TEST_F(NavigationEntryTest, NavigationEntryAccessors) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // Content in |output| is not modified if data is not present at the key. 284 // Content in |output| is not modified if data is not present at the key.
285 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output)); 285 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output));
286 EXPECT_EQ(test_data, output); 286 EXPECT_EQ(test_data, output);
287 // Using an empty string shows that the data is not present in the map. 287 // Using an empty string shows that the data is not present in the map.
288 base::string16 output2; 288 base::string16 output2;
289 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output2)); 289 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output2));
290 EXPECT_EQ(ASCIIToUTF16(""), output2); 290 EXPECT_EQ(ASCIIToUTF16(""), output2);
291 } 291 }
292 292
293 } // namespace content 293 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/security_handler.cc ('k') | content/browser/loader/navigation_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698