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

Side by Side Diff: net/proxy/proxy_info_unittest.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « net/proxy/proxy_info.h ('k') | net/quic/congestion_control/cubic.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/net_errors.h" 5 #include "net/base/net_errors.h"
6 #include "net/proxy/proxy_info.h" 6 #include "net/proxy/proxy_info.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace net { 9 namespace net {
10 namespace { 10 namespace {
(...skipping 14 matching lines...) Expand all
25 info.UsePacString("PROXY myproxy:80"); 25 info.UsePacString("PROXY myproxy:80");
26 EXPECT_FALSE(info.is_direct_only()); 26 EXPECT_FALSE(info.is_direct_only());
27 27
28 info.UsePacString("DIRECT; PROXY myproxy:80"); 28 info.UsePacString("DIRECT; PROXY myproxy:80");
29 EXPECT_TRUE(info.is_direct()); 29 EXPECT_TRUE(info.is_direct());
30 EXPECT_FALSE(info.is_direct_only()); 30 EXPECT_FALSE(info.is_direct_only());
31 31
32 info.UsePacString("PROXY myproxy:80; DIRECT"); 32 info.UsePacString("PROXY myproxy:80; DIRECT");
33 EXPECT_FALSE(info.is_direct()); 33 EXPECT_FALSE(info.is_direct());
34 EXPECT_FALSE(info.is_direct_only()); 34 EXPECT_FALSE(info.is_direct_only());
35 EXPECT_EQ(2u, info.proxy_list().size());
36 EXPECT_EQ("PROXY myproxy:80;DIRECT", info.proxy_list().ToPacString());
35 // After falling back to direct, we shouldn't consider it DIRECT only. 37 // After falling back to direct, we shouldn't consider it DIRECT only.
36 EXPECT_TRUE(info.Fallback(ERR_PROXY_CONNECTION_FAILED, BoundNetLog())); 38 EXPECT_TRUE(info.Fallback(ERR_PROXY_CONNECTION_FAILED, BoundNetLog()));
37 EXPECT_TRUE(info.is_direct()); 39 EXPECT_TRUE(info.is_direct());
38 EXPECT_FALSE(info.is_direct_only()); 40 EXPECT_FALSE(info.is_direct_only());
39 } 41 }
40 42
41 } // namespace 43 } // namespace
42 } // namespace net 44 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_info.h ('k') | net/quic/congestion_control/cubic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698