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

Side by Side Diff: chrome/browser/ui/login/login_handler_unittest.cc

Issue 2849713003: Move all Page Info strings into page_info_strings.grdp (Closed)
Patch Set: Fix moar. Created 3 years, 7 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
« no previous file with comments | « chrome/browser/ui/login/login_handler.cc ('k') | chrome/browser/ui/page_info/page_info.cc » ('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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/login/login_handler.h" 9 #include "chrome/browser/ui/login/login_handler.h"
10 #include "net/base/auth.h" 10 #include "net/base/auth.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace { 14 namespace {
15 15
16 const char kHttpUrl[] = "http://example.com/foo/bar"; 16 const char kHttpUrl[] = "http://example.com/foo/bar";
17 const char kBasicAuthScheme[] = "Basic"; 17 const char kBasicAuthScheme[] = "Basic";
18 const char kFooRealm[] = "Foo"; 18 const char kFooRealm[] = "Foo";
19 const char kInsecureProxy[] = "Your connection to this site is not private."; 19 const char kInsecureProxy[] = "Your connection to this site is not secure";
20 20
21 enum TargetType { PROXY, SERVER }; 21 enum TargetType { PROXY, SERVER };
22 22
23 const struct TestCase { 23 const struct TestCase {
24 const char* const request_url; 24 const char* const request_url;
25 struct { 25 struct {
26 TargetType target_type; 26 TargetType target_type;
27 const char* const scheme; 27 const char* const scheme;
28 const char* const realm; 28 const char* const realm;
29 const char* const challenger; 29 const char* const challenger;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 &explanation); 133 &explanation);
134 EXPECT_STREQ(test_case.expected.authority, 134 EXPECT_STREQ(test_case.expected.authority,
135 base::UTF16ToASCII(authority).c_str()); 135 base::UTF16ToASCII(authority).c_str());
136 EXPECT_STREQ(test_case.expected.explanation, 136 EXPECT_STREQ(test_case.expected.explanation,
137 base::UTF16ToASCII(explanation).c_str()); 137 base::UTF16ToASCII(explanation).c_str());
138 138
139 EXPECT_STREQ(test_case.expected.signon_realm, 139 EXPECT_STREQ(test_case.expected.signon_realm,
140 LoginHandler::GetSignonRealm(request_url, *auth_info).c_str()); 140 LoginHandler::GetSignonRealm(request_url, *auth_info).c_str());
141 } 141 }
142 } 142 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_handler.cc ('k') | chrome/browser/ui/page_info/page_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698