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

Side by Side Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 7995014: Revert 102322 - For the SSL cert status, convert anonymous enum that gives bit values into a type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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
« no previous file with comments | « chrome/browser/page_info_model.cc ('k') | chrome/browser/ssl/ssl_error_info.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 NavigationEntry* entry = tab->controller().GetActiveEntry(); 59 NavigationEntry* entry = tab->controller().GetActiveEntry();
60 ASSERT_TRUE(entry); 60 ASSERT_TRUE(entry);
61 EXPECT_EQ(NORMAL_PAGE, entry->page_type()); 61 EXPECT_EQ(NORMAL_PAGE, entry->page_type());
62 EXPECT_EQ(SECURITY_STYLE_UNAUTHENTICATED, entry->ssl().security_style()); 62 EXPECT_EQ(SECURITY_STYLE_UNAUTHENTICATED, entry->ssl().security_style());
63 EXPECT_EQ(0, entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS); 63 EXPECT_EQ(0, entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS);
64 EXPECT_FALSE(entry->ssl().displayed_insecure_content()); 64 EXPECT_FALSE(entry->ssl().displayed_insecure_content());
65 EXPECT_FALSE(entry->ssl().ran_insecure_content()); 65 EXPECT_FALSE(entry->ssl().ran_insecure_content());
66 } 66 }
67 67
68 void CheckAuthenticationBrokenState(TabContents* tab, 68 void CheckAuthenticationBrokenState(TabContents* tab,
69 net::CertStatus error, 69 int error,
70 bool ran_insecure_content, 70 bool ran_insecure_content,
71 bool interstitial) { 71 bool interstitial) {
72 NavigationEntry* entry = tab->controller().GetActiveEntry(); 72 NavigationEntry* entry = tab->controller().GetActiveEntry();
73 ASSERT_TRUE(entry); 73 ASSERT_TRUE(entry);
74 EXPECT_EQ(interstitial ? INTERSTITIAL_PAGE : NORMAL_PAGE, 74 EXPECT_EQ(interstitial ? INTERSTITIAL_PAGE : NORMAL_PAGE,
75 entry->page_type()); 75 entry->page_type());
76 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN, 76 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN,
77 entry->ssl().security_style()); 77 entry->ssl().security_style());
78 // CERT_STATUS_UNABLE_TO_CHECK_REVOCATION doesn't lower the security style 78 // CERT_STATUS_UNABLE_TO_CHECK_REVOCATION doesn't lower the security style
79 // to SECURITY_STYLE_AUTHENTICATION_BROKEN. 79 // to SECURITY_STYLE_AUTHENTICATION_BROKEN.
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 1285
1286 // Visit a page over https that contains a frame with a redirect. 1286 // Visit a page over https that contains a frame with a redirect.
1287 1287
1288 // XMLHttpRequest insecure content in synchronous mode. 1288 // XMLHttpRequest insecure content in synchronous mode.
1289 1289
1290 // XMLHttpRequest insecure content in asynchronous mode. 1290 // XMLHttpRequest insecure content in asynchronous mode.
1291 1291
1292 // XMLHttpRequest over bad ssl in synchronous mode. 1292 // XMLHttpRequest over bad ssl in synchronous mode.
1293 1293
1294 // XMLHttpRequest over OK ssl in synchronous mode. 1294 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW
« no previous file with comments | « chrome/browser/page_info_model.cc ('k') | chrome/browser/ssl/ssl_error_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698