Skip to content

Commit

Permalink
Removing iOS9 code remnants (7)
Browse files Browse the repository at this point in the history
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I26277bdb085fa06f5e9e6419f379b6f3f085e814
Reviewed-on: https://chromium-review.googlesource.com/986259
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547500}
  • Loading branch information
e-noyau authored and Commit Bot committed Apr 2, 2018
1 parent e53b017 commit c58d701
Showing 1 changed file with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#import "ios/chrome/browser/ui/dialogs/nsurl_protection_space_util.h"

#include "base/ios/ios_util.h"
#include "base/strings/sys_string_conversions.h"
#include "components/strings/grit/components_strings.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down Expand Up @@ -122,26 +121,18 @@
ASSERT_TRUE(CanShow(protectionSpace));

NSString* expectedText = nil;
// On iOS 10, HTTPS Proxy protection space reports itself as unsecure
// HTTPS Proxy protection space reports itself as unsecure
// (crbug.com/629570).
if (base::ios::IsRunningOnIOS10OrLater()) {
// Expecting the following text:
// The proxy https://chromium.org requires a username and password.
// Your connection to this site is not private.
expectedText = [NSString
stringWithFormat:@"%@ %@",
l10n_util::GetNSStringF(
IDS_LOGIN_DIALOG_PROXY_AUTHORITY,
base::SysNSStringToUTF16(kTestHttpsOrigin)),
l10n_util::GetNSString(
IDS_PAGE_INFO_NOT_SECURE_SUMMARY)];
} else {
// Expecting the following text:
// The proxy https://chromium.org:80 requires a username and password.
expectedText =
l10n_util::GetNSStringF(IDS_LOGIN_DIALOG_PROXY_AUTHORITY,
base::SysNSStringToUTF16(kTestHttpsOrigin));
}
// Expecting the following text:
// The proxy https://chromium.org requires a username and password.
// Your connection to this site is not private.
expectedText = [NSString
stringWithFormat:@"%@ %@",
l10n_util::GetNSStringF(
IDS_LOGIN_DIALOG_PROXY_AUTHORITY,
base::SysNSStringToUTF16(kTestHttpsOrigin)),
l10n_util::GetNSString(
IDS_PAGE_INFO_NOT_SECURE_SUMMARY)];
EXPECT_NSEQ(expectedText, MessageForHTTPAuth(protectionSpace));
}

Expand Down

0 comments on commit c58d701

Please sign in to comment.