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

Unified Diff: net/proxy/proxy_server_unittest.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_config_source.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_server_unittest.cc
diff --git a/net/proxy/proxy_server_unittest.cc b/net/proxy/proxy_server_unittest.cc
index 2471b59cc48548dfb7d54110f49c58179cb1746a..0a596e47c73d5d5b94fef179904e9b46a7039154 100644
--- a/net/proxy/proxy_server_unittest.cc
+++ b/net/proxy/proxy_server_unittest.cc
@@ -11,12 +11,12 @@
// was labelled correctly, and the accessors all give the right data.
TEST(ProxyServerTest, FromURI) {
const struct {
- const char* input_uri;
- const char* expected_uri;
+ const char* const input_uri;
+ const char* const expected_uri;
net::ProxyServer::Scheme expected_scheme;
- const char* expected_host;
+ const char* const expected_host;
int expected_port;
- const char* expected_pac_string;
+ const char* const expected_pac_string;
} tests[] = {
// HTTP proxy URIs:
{
@@ -191,7 +191,7 @@ TEST(ProxyServerTest, Direct) {
// Test parsing some invalid inputs.
TEST(ProxyServerTest, Invalid) {
- const char* tests[] = {
+ const char* const tests[] = {
"",
" ",
"dddf:", // not a valid port
@@ -214,7 +214,7 @@ TEST(ProxyServerTest, Invalid) {
// Test that LWS (SP | HT) is disregarded from the ends.
TEST(ProxyServerTest, Whitespace) {
- const char* tests[] = {
+ const char* const tests[] = {
" foopy:80",
"foopy:80 \t",
" \tfoopy:80 ",
@@ -230,8 +230,8 @@ TEST(ProxyServerTest, Whitespace) {
// Test parsing a ProxyServer from a PAC representation.
TEST(ProxyServerTest, FromPACString) {
const struct {
- const char* input_pac;
- const char* expected_uri;
+ const char* const input_pac;
+ const char* const expected_uri;
} tests[] = {
{
"PROXY foopy:10",
@@ -288,7 +288,7 @@ TEST(ProxyServerTest, FromPACString) {
// Test parsing a ProxyServer from an invalid PAC representation.
TEST(ProxyServerTest, FromPACStringInvalid) {
- const char* tests[] = {
+ const char* const tests[] = {
"PROXY", // missing host/port.
"HTTPS", // missing host/port.
"SOCKS", // missing host/port.
@@ -304,8 +304,8 @@ TEST(ProxyServerTest, FromPACStringInvalid) {
TEST(ProxyServerTest, ComparatorAndEquality) {
struct {
// Inputs.
- const char* server1;
- const char* server2;
+ const char* const server1;
+ const char* const server2;
// Expectation.
// -1 means server1 is less than server2
« no previous file with comments | « net/proxy/proxy_config_source.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698