Commit 7cde8513 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Commit Bot

Revert "PageInfo: decouple safe browsing and TLS statii."

This reverts commit ee95bc44.

Reason for revert: suspect causing unit_tests failure on Linux MSAN Tests:
https://ci.chromium.org/p/chromium/builders/ci/Linux%20MSan%20Tests/17649
PageInfoBubbleViewTest.ChangingFlashSettingForSiteIsRemembered
PageInfoBubbleViewTest.EnsureCloseCallback
PageInfoBubbleViewTest.NotificationPermissionRevokeUkm
PageInfoBubbleViewTest.OpenPageInfoBubbleAfterNavigationStart
PageInfoBubbleViewTest.SetPermissionInfo
PageInfoBubbleViewTest.SetPermissionInfoForUsbGuard
PageInfoBubbleViewTest.SetPermissionInfoWithPolicyUsbDevices
PageInfoBubbleViewTest.SetPermissionInfoWithUsbDevice
PageInfoBubbleViewTest.SetPermissionInfoWithUserAndPolicyUsbDevices
PageInfoBubbleViewTest.UpdatingSiteDataRetainsLayout

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8909718923797040064/+/steps/unit_tests/0/logs/Deterministic_failure:_PageInfoBubbleViewTest.ChangingFlashSettingForSiteIsRemembered__status_CRASH_/0

[ RUN      ] PageInfoBubbleViewTest.ChangingFlashSettingForSiteIsRemembered
==9056==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x561baaab15ec in PageInfoUI::GetSecurityDescription(PageInfoUI::IdentityInfo const&) const ./../../chrome/browser/ui/page_info/page_info_ui.cc:250:3
    #1 0x561bab6a1548 in PageInfoBubbleView::SetIdentityInfo(PageInfoUI::IdentityInfo const&) ./../../chrome/browser/ui/views/page_info/page_info_bubble_view.cc:802:7
    #2 0x561baaaab3bb in PageInfo::PresentSiteIdentity() ./../../chrome/browser/ui/page_info/page_info.cc:969:8
    #3 0x561baaaa0a21 in PageInfo::PageInfo(PageInfoUI*, Profile*, TabSpecificContentSettings*, content::WebContents*, GURL const&, security_state::SecurityLevel, security_state::VisibleSecurityState const&) ./../../chrome/browser/ui/page_info/page_info.cc:344:3
    #4 0x561bab69b6dd in PageInfoBubbleView::PageInfoBubbleView(views::View*, gfx::Rect const&, aura::Window*, Profile*, content::WebContents*, GURL const&, security_state::SecurityLevel, security_state::VisibleSecurityState const&, base::OnceCallback<void (views::Widget::ClosedReason, bool)>) ./../../chrome/browser/ui/views/page_info/page_info_bubble_view.cc:576:24
...

Original change's description:
> PageInfo: decouple safe browsing and TLS statii.
> 
> Previously, the Page Info bubble maintained a single variable to
> identify all reasons that a page might have a non-standard status. This
> lead to the display logic making assumptions about, for instance, the
> validity of a certificate when the page was flagged by Safe Browsing.
> 
> This CL separates out the Safe Browsing status from the site identity
> status so that the page info bubble can inform the user that the site's
> certificate is invalid, even if it's also flagged by Safe Browsing.
> 
> Bug: 869925
> Change-Id: I34107225b4206c8f32771ccd75e9367668d0a72b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662537
> Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
> Reviewed-by: Bret Sepulveda <bsep@chromium.org>
> Auto-Submit: Joe DeBlasio <jdeblasio@chromium.org>
> Commit-Queue: Joe DeBlasio <jdeblasio@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#671847}

TBR=meacer@chromium.org,bsep@chromium.org,jdeblasio@chromium.org

Change-Id: I8be652952e7276bcc9266124693352e467159cc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 869925
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1673985Reviewed-by: default avatarTakashi Sakamoto <tasak@google.com>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Commit-Position: refs/heads/master@{#671932}
parent 0789a15e
This diff is collapsed.
......@@ -87,20 +87,15 @@ class PageInfo : public TabSpecificContentSettings::SiteDataObserver,
// The website provided a valid certificate, but the certificate or chain
// is using a deprecated signature algorithm.
SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM,
};
// Safe Browsing status of a website.
enum SafeBrowsingStatus {
SAFE_BROWSING_STATUS_NONE = 0,
// The website has been flagged by Safe Browsing as dangerous for
// containing malware, social engineering, unwanted software, or password
// reuse on a low reputation site.
SAFE_BROWSING_STATUS_MALWARE,
SAFE_BROWSING_STATUS_SOCIAL_ENGINEERING,
SAFE_BROWSING_STATUS_UNWANTED_SOFTWARE,
SAFE_BROWSING_STATUS_SIGN_IN_PASSWORD_REUSE,
SAFE_BROWSING_STATUS_ENTERPRISE_PASSWORD_REUSE,
SAFE_BROWSING_STATUS_BILLING,
SITE_IDENTITY_STATUS_MALWARE,
SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING,
SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE,
SITE_IDENTITY_STATUS_SIGN_IN_PASSWORD_REUSE,
SITE_IDENTITY_STATUS_ENTERPRISE_PASSWORD_REUSE,
SITE_IDENTITY_STATUS_BILLING,
};
// Events for UMA. Do not reorder or change! Exposed in header so enum is
......@@ -197,12 +192,8 @@ class PageInfo : public TabSpecificContentSettings::SiteDataObserver,
return site_identity_status_;
}
const SafeBrowsingStatus& safe_browsing_status() const {
return safe_browsing_status_;
}
const base::string16& site_details_message() const {
return site_details_message_;
const base::string16& site_identity_details() const {
return site_identity_details_;
}
const base::string16& organization_name() const { return organization_name_; }
......@@ -241,12 +232,11 @@ class PageInfo : public TabSpecificContentSettings::SiteDataObserver,
void RecordPasswordReuseEvent();
#endif
// Helper function to get the Safe Browsing status and details by malicious
// content status.
// TODO(jdeblasio): Eliminate this and just use MaliciousContentStatus?
void GetSafeBrowsingStatusByMaliciousContentStatus(
// Helper function to get the site identification status and details by
// malicious content status.
void GetSiteIdentityByMaliciousContentStatus(
security_state::MaliciousContentStatus malicious_content_status,
PageInfo::SafeBrowsingStatus* status,
PageInfo::SiteIdentityStatus* status,
base::string16* details);
// Retrieves all the permissions that are shown in Page Info.
......@@ -270,9 +260,6 @@ class PageInfo : public TabSpecificContentSettings::SiteDataObserver,
// Status of the website's identity verification check.
SiteIdentityStatus site_identity_status_;
// Safe Browsing status of the website.
SafeBrowsingStatus safe_browsing_status_;
// For secure connection |certificate_| is set to the server certificate.
scoped_refptr<net::X509Certificate> certificate_;
......@@ -284,9 +271,9 @@ class PageInfo : public TabSpecificContentSettings::SiteDataObserver,
// unnecessary UTF-8 string conversions.
// Details about the website's identity. If the website's identity has been
// verified then |site_details_message_| contains who verified the identity.
// verified then |site_identity_details_| contains who verified the identity.
// This string will be displayed in the UI.
base::string16 site_details_message_;
base::string16 site_identity_details_;
// Set when the user has explicitly bypassed an SSL error for this host or
// explicitly denied it (the latter of which is not currently possible in the
......
......@@ -232,7 +232,6 @@ PageInfoUI::ChosenObjectInfo::~ChosenObjectInfo() {}
PageInfoUI::IdentityInfo::IdentityInfo()
: identity_status(PageInfo::SITE_IDENTITY_STATUS_UNKNOWN),
safe_browsing_status(PageInfo::SAFE_BROWSING_STATUS_NONE),
connection_status(PageInfo::SITE_CONNECTION_STATUS_UNKNOWN),
show_ssl_decision_revoke_button(false),
show_change_password_buttons(false) {}
......@@ -247,41 +246,6 @@ PageInfoUI::GetSecurityDescription(const IdentityInfo& identity_info) const {
std::unique_ptr<PageInfoUI::SecurityDescription> security_description(
new PageInfoUI::SecurityDescription());
switch (identity_info.safe_browsing_status) {
case PageInfo::SAFE_BROWSING_STATUS_NONE:
break;
case PageInfo::SAFE_BROWSING_STATUS_MALWARE:
return CreateSecurityDescription(SecuritySummaryColor::RED,
IDS_PAGE_INFO_MALWARE_SUMMARY,
IDS_PAGE_INFO_MALWARE_DETAILS);
case PageInfo::SAFE_BROWSING_STATUS_SOCIAL_ENGINEERING:
return CreateSecurityDescription(
SecuritySummaryColor::RED, IDS_PAGE_INFO_SOCIAL_ENGINEERING_SUMMARY,
IDS_PAGE_INFO_SOCIAL_ENGINEERING_DETAILS);
case PageInfo::SAFE_BROWSING_STATUS_UNWANTED_SOFTWARE:
return CreateSecurityDescription(SecuritySummaryColor::RED,
IDS_PAGE_INFO_UNWANTED_SOFTWARE_SUMMARY,
IDS_PAGE_INFO_UNWANTED_SOFTWARE_DETAILS);
case PageInfo::SAFE_BROWSING_STATUS_SIGN_IN_PASSWORD_REUSE:
#if defined(FULL_SAFE_BROWSING)
return CreateSecurityDescriptionForPasswordReuse(
/*is_enterprise_password=*/false);
#endif
NOTREACHED();
break;
case PageInfo::SAFE_BROWSING_STATUS_ENTERPRISE_PASSWORD_REUSE:
#if defined(FULL_SAFE_BROWSING)
return CreateSecurityDescriptionForPasswordReuse(
/*is_enterprise_password=*/true);
#endif
NOTREACHED();
break;
case PageInfo::SAFE_BROWSING_STATUS_BILLING:
return CreateSecurityDescription(SecuritySummaryColor::RED,
IDS_PAGE_INFO_BILLING_SUMMARY,
IDS_PAGE_INFO_BILLING_DETAILS);
}
switch (identity_info.identity_status) {
case PageInfo::SITE_IDENTITY_STATUS_INTERNAL_PAGE:
#if defined(OS_ANDROID)
......@@ -321,6 +285,32 @@ PageInfoUI::GetSecurityDescription(const IdentityInfo& identity_info) const {
IDS_PAGE_INFO_SECURE_SUMMARY,
IDS_PAGE_INFO_SECURE_DETAILS);
}
case PageInfo::SITE_IDENTITY_STATUS_MALWARE:
return CreateSecurityDescription(SecuritySummaryColor::RED,
IDS_PAGE_INFO_MALWARE_SUMMARY,
IDS_PAGE_INFO_MALWARE_DETAILS);
case PageInfo::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING:
return CreateSecurityDescription(
SecuritySummaryColor::RED, IDS_PAGE_INFO_SOCIAL_ENGINEERING_SUMMARY,
IDS_PAGE_INFO_SOCIAL_ENGINEERING_DETAILS);
case PageInfo::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE:
return CreateSecurityDescription(SecuritySummaryColor::RED,
IDS_PAGE_INFO_UNWANTED_SOFTWARE_SUMMARY,
IDS_PAGE_INFO_UNWANTED_SOFTWARE_DETAILS);
case PageInfo::SITE_IDENTITY_STATUS_SIGN_IN_PASSWORD_REUSE:
#if defined(FULL_SAFE_BROWSING)
return CreateSecurityDescriptionForPasswordReuse(
/*is_enterprise_password=*/false);
#endif
case PageInfo::SITE_IDENTITY_STATUS_ENTERPRISE_PASSWORD_REUSE:
#if defined(FULL_SAFE_BROWSING)
return CreateSecurityDescriptionForPasswordReuse(
/*is_enterprise_password=*/true);
#endif
case PageInfo::SITE_IDENTITY_STATUS_BILLING:
return CreateSecurityDescription(SecuritySummaryColor::RED,
IDS_PAGE_INFO_BILLING_SUMMARY,
IDS_PAGE_INFO_BILLING_DETAILS);
case PageInfo::SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM:
case PageInfo::SITE_IDENTITY_STATUS_UNKNOWN:
case PageInfo::SITE_IDENTITY_STATUS_NO_CERT:
......
......@@ -117,8 +117,6 @@ class PageInfoUI {
std::string site_identity;
// Status of the site's identity.
PageInfo::SiteIdentityStatus identity_status;
// Site's Safe Browsing status.
PageInfo::SafeBrowsingStatus safe_browsing_status;
// Textual description of the site's identity status that is displayed to
// the user.
std::string identity_status_description;
......
......@@ -442,8 +442,8 @@ TEST_F(PageInfoTest, Malware) {
EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED,
page_info()->site_connection_status());
EXPECT_EQ(PageInfo::SAFE_BROWSING_STATUS_MALWARE,
page_info()->safe_browsing_status());
EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_MALWARE,
page_info()->site_identity_status());
}
TEST_F(PageInfoTest, SocialEngineering) {
......@@ -454,8 +454,8 @@ TEST_F(PageInfoTest, SocialEngineering) {
EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED,
page_info()->site_connection_status());
EXPECT_EQ(PageInfo::SAFE_BROWSING_STATUS_SOCIAL_ENGINEERING,
page_info()->safe_browsing_status());
EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING,
page_info()->site_identity_status());
}
TEST_F(PageInfoTest, UnwantedSoftware) {
......@@ -466,8 +466,8 @@ TEST_F(PageInfoTest, UnwantedSoftware) {
EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED,
page_info()->site_connection_status());
EXPECT_EQ(PageInfo::SAFE_BROWSING_STATUS_UNWANTED_SOFTWARE,
page_info()->safe_browsing_status());
EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE,
page_info()->site_identity_status());
}
#if defined(FULL_SAFE_BROWSING)
......@@ -479,8 +479,8 @@ TEST_F(PageInfoTest, SignInPasswordReuse) {
EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED,
page_info()->site_connection_status());
EXPECT_EQ(PageInfo::SAFE_BROWSING_STATUS_SIGN_IN_PASSWORD_REUSE,
page_info()->safe_browsing_status());
EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_SIGN_IN_PASSWORD_REUSE,
page_info()->site_identity_status());
}
TEST_F(PageInfoTest, EnterprisePasswordReuse) {
......@@ -491,8 +491,8 @@ TEST_F(PageInfoTest, EnterprisePasswordReuse) {
EXPECT_EQ(PageInfo::SITE_CONNECTION_STATUS_UNENCRYPTED,
page_info()->site_connection_status());
EXPECT_EQ(PageInfo::SAFE_BROWSING_STATUS_ENTERPRISE_PASSWORD_REUSE,
page_info()->safe_browsing_status());
EXPECT_EQ(PageInfo::SITE_IDENTITY_STATUS_ENTERPRISE_PASSWORD_REUSE,
page_info()->site_identity_status());
}
#endif
......@@ -768,7 +768,7 @@ TEST_F(PageInfoTest, HTTPSEVCert) {
EXPECT_EQ(
base::UTF8ToUTF16(
"This page has been identified as being owned by Google Inc [US]."),
page_info()->site_details_message());
page_info()->site_identity_details());
}
TEST_F(PageInfoTest, HTTPSRevocationError) {
......
......@@ -28,8 +28,6 @@ class StyledLabel;
class View;
} // namespace views
class PageInfoBubbleViewBrowserTest;
// A button taking the full width of its parent that shows a background color
// when hovered over.
class HoverButton : public views::MenuButton, public views::MenuButtonListener {
......@@ -122,7 +120,6 @@ class HoverButton : public views::MenuButton, public views::MenuButtonListener {
SetStatusLabel);
FRIEND_TEST_ALL_PREFIXES(ExtensionsMenuButtonTest,
UpdatesToDisplayCorrectActionTitle);
friend class PageInfoBubbleViewBrowserTest;
views::StyledLabel* title_ = nullptr;
views::Label* subtitle_ = nullptr;
......
......@@ -15,7 +15,6 @@
#include "chrome/browser/ui/page_info/page_info_dialog.h"
#include "chrome/browser/ui/page_info/page_info_ui.h"
#include "chrome/browser/ui/views/bubble_anchor_util_views.h"
#include "chrome/browser/ui/views/hover_button.h"
#include "chrome/browser/ui/views/page_info/chosen_object_view_observer.h"
#include "chrome/browser/ui/views/page_info/page_info_bubble_view_base.h"
#include "chrome/browser/ui/views/page_info/permission_selector_row.h"
......@@ -25,12 +24,12 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/link_listener.h"
#include "ui/views/controls/separator.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/controls/styled_label_listener.h"
#include "ui/views/widget/widget.h"
class BubbleHeaderView;
class GURL;
class HoverButton;
class Profile;
namespace content {
......
......@@ -50,8 +50,6 @@
namespace {
constexpr char kExpiredCertificateFile[] = "expired_cert.pem";
class ClickEvent : public ui::Event {
public:
ClickEvent() : ui::Event(ui::ET_UNKNOWN, base::TimeTicks(), 0) {}
......@@ -142,7 +140,6 @@ class PageInfoBubbleViewBrowserTest : public DialogBrowserTest {
constexpr char kUnwantedSoftware[] = "UnwantedSoftware";
constexpr char kSignInPasswordReuse[] = "SignInPasswordReuse";
constexpr char kEnterprisePasswordReuse[] = "EnterprisePasswordReuse";
constexpr char kMalwareAndBadCert[] = "MalwareAndBadCert";
constexpr char kMixedContentForm[] = "MixedContentForm";
constexpr char kMixedContent[] = "MixedContent";
constexpr char kAllowAllPermissions[] = "AllowAllPermissions";
......@@ -160,7 +157,7 @@ class PageInfoBubbleViewBrowserTest : public DialogBrowserTest {
GURL url = http_url;
if (name == kSecure || name == kEvSecure || name == kMixedContentForm ||
name == kMixedContent || name == kAllowAllPermissions ||
name == kBlockAllPermissions || name == kMalwareAndBadCert) {
name == kBlockAllPermissions) {
url = https_url;
}
if (name == kInternal) {
......@@ -206,24 +203,19 @@ class PageInfoBubbleViewBrowserTest : public DialogBrowserTest {
expected_identifiers_.push_back(
PageInfoBubbleView::VIEW_ID_PAGE_INFO_LABEL_EV_CERTIFICATE_DETAILS);
} else if (name == kMalware) {
identity.safe_browsing_status = PageInfo::SAFE_BROWSING_STATUS_MALWARE;
identity.identity_status = PageInfo::SITE_IDENTITY_STATUS_MALWARE;
} else if (name == kDeceptive) {
identity.safe_browsing_status =
PageInfo::SAFE_BROWSING_STATUS_SOCIAL_ENGINEERING;
identity.identity_status =
PageInfo::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING;
} else if (name == kUnwantedSoftware) {
identity.safe_browsing_status =
PageInfo::SAFE_BROWSING_STATUS_UNWANTED_SOFTWARE;
identity.identity_status =
PageInfo::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE;
} else if (name == kSignInPasswordReuse) {
identity.safe_browsing_status =
PageInfo::SAFE_BROWSING_STATUS_SIGN_IN_PASSWORD_REUSE;
identity.identity_status =
PageInfo::SITE_IDENTITY_STATUS_SIGN_IN_PASSWORD_REUSE;
} else if (name == kEnterprisePasswordReuse) {
identity.safe_browsing_status =
PageInfo::SAFE_BROWSING_STATUS_ENTERPRISE_PASSWORD_REUSE;
} else if (name == kMalwareAndBadCert) {
identity.identity_status = PageInfo::SITE_IDENTITY_STATUS_ERROR;
identity.certificate = net::ImportCertFromFile(
net::GetTestCertsDirectory(), kExpiredCertificateFile);
identity.safe_browsing_status = PageInfo::SAFE_BROWSING_STATUS_MALWARE;
identity.identity_status =
PageInfo::SITE_IDENTITY_STATUS_ENTERPRISE_PASSWORD_REUSE;
} else if (name == kMixedContentForm) {
identity.identity_status =
PageInfo::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT;
......@@ -348,15 +340,6 @@ class PageInfoBubbleViewBrowserTest : public DialogBrowserTest {
->SetIdentityInfo(identity_info);
}
base::string16 GetCertificateButtonTitle() const {
// Only PageInfoBubbleViewBrowserTest can access certificate_button_ in
// PageInfoBubbleView, or title() in HoverButton.
PageInfoBubbleView* page_info_bubble_view =
static_cast<PageInfoBubbleView*>(
PageInfoBubbleView::GetPageInfoBubble());
return page_info_bubble_view->certificate_button_->title()->text();
}
private:
std::vector<PageInfoBubbleView::PageInfoBubbleViewID> expected_identifiers_;
......@@ -638,13 +621,6 @@ IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest, InvokeUi_PasswordReuse) {
ShowAndVerifyUi();
}
// Shows the Page Info bubble for a site flagged for malware that also has a bad
// certificate.
IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest,
InvokeUi_MalwareAndBadCert) {
ShowAndVerifyUi();
}
// Shows the Page Info bubble for an admin-provided cert when the page is
// secure, but has a form that submits to an insecure url.
IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest,
......@@ -738,41 +714,6 @@ IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest,
l10n_util::GetStringUTF16(IDS_PAGE_INFO_MIXED_CONTENT_SUMMARY));
}
// Ensure a page can both have an invalid certificate *and* be blocked by Safe
// Browsing. Regression test for bug 869925.
IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest, BlockedAndInvalidCert) {
net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
https_server.AddDefaultHandlers(
base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
ASSERT_TRUE(https_server.Start());
ui_test_utils::NavigateToURL(browser(), https_server.GetURL("/simple.html"));
// Setup the bogus identity with an expired cert and SB flagging.
PageInfoUI::IdentityInfo identity;
identity.identity_status = PageInfo::SITE_IDENTITY_STATUS_ERROR;
identity.certificate = net::ImportCertFromFile(net::GetTestCertsDirectory(),
kExpiredCertificateFile);
identity.safe_browsing_status = PageInfo::SAFE_BROWSING_STATUS_MALWARE;
OpenPageInfoBubble(browser());
SetPageInfoBubbleIdentityInfo(identity);
views::BubbleDialogDelegateView* page_info =
PageInfoBubbleView::GetPageInfoBubble();
// Verify bubble complains of malware...
EXPECT_EQ(page_info->GetWindowTitle(),
l10n_util::GetStringUTF16(IDS_PAGE_INFO_MALWARE_SUMMARY));
// ...and has a "Certificate (Invalid)" button.
const base::string16 invalid_parens = l10n_util::GetStringUTF16(
IDS_PAGE_INFO_CERTIFICATE_INVALID_PARENTHESIZED);
EXPECT_EQ(GetCertificateButtonTitle(),
l10n_util::GetStringFUTF16(IDS_PAGE_INFO_CERTIFICATE_BUTTON_TEXT,
invalid_parens));
}
namespace {
// Tracks focus of an arbitrary UI element.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment