OLD | NEW |
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_EQ(SECURITY_STYLE_UNKNOWN, entry1_->GetSSL().security_style); |
141 EXPECT_EQ(SECURITY_STYLE_UNKNOWN, entry2_->GetSSL().security_style); | 141 EXPECT_EQ(SECURITY_STYLE_UNKNOWN, entry2_->GetSSL().security_style); |
142 EXPECT_EQ(0, entry1_->GetSSL().cert_id); | 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) { |
152 // SiteInstance | 152 // SiteInstance |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // Content in |output| is not modified if data is not present at the key. | 286 // Content in |output| is not modified if data is not present at the key. |
287 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output)); | 287 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output)); |
288 EXPECT_EQ(test_data, output); | 288 EXPECT_EQ(test_data, output); |
289 // Using an empty string shows that the data is not present in the map. | 289 // Using an empty string shows that the data is not present in the map. |
290 base::string16 output2; | 290 base::string16 output2; |
291 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output2)); | 291 EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output2)); |
292 EXPECT_EQ(ASCIIToUTF16(""), output2); | 292 EXPECT_EQ(ASCIIToUTF16(""), output2); |
293 } | 293 } |
294 | 294 |
295 } // namespace content | 295 } // namespace content |
OLD | NEW |