OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/proxy/proxy_config_service_linux.h" | 5 #include "net/proxy/proxy_config_service_linux.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 563 matching lines...) Loading... |
574 "", "", "", "socks.com", // hosts | 574 "", "", "", "socks.com", // hosts |
575 0, 0, 0, 99, // ports | 575 0, 0, 0, 99, // ports |
576 TRUE, FALSE, FALSE, // use, same, auth | 576 TRUE, FALSE, FALSE, // use, same, auth |
577 empty_ignores, // ignore_hosts | 577 empty_ignores, // ignore_hosts |
578 }, | 578 }, |
579 | 579 |
580 // Expected result. | 580 // Expected result. |
581 false, // auto_detect | 581 false, // auto_detect |
582 GURL(), // pac_url | 582 GURL(), // pac_url |
583 ProxyRulesExpectation::Single( | 583 ProxyRulesExpectation::Single( |
584 "socks4://socks.com:99", // single proxy | 584 "socks5://socks.com:99", // single proxy |
585 "") // bypass rules | 585 "") // bypass rules |
586 }, | 586 }, |
587 | 587 |
588 { | 588 { |
589 TEST_DESC("Bypass *.google.com"), | 589 TEST_DESC("Bypass *.google.com"), |
590 { // Input. | 590 { // Input. |
591 "manual", // mode | 591 "manual", // mode |
592 "", // autoconfig_url | 592 "", // autoconfig_url |
593 "www.google.com", "", "", "", // hosts | 593 "www.google.com", "", "", "", // hosts |
594 80, 0, 0, 0, // ports | 594 80, 0, 0, 0, // ports |
(...skipping 222 matching lines...) Loading... |
817 "", // all_proxy | 817 "", // all_proxy |
818 NULL, NULL, NULL, // per-proto proxies | 818 NULL, NULL, NULL, // per-proto proxies |
819 "socks.com:888", NULL, // SOCKS | 819 "socks.com:888", NULL, // SOCKS |
820 NULL, // no_proxy | 820 NULL, // no_proxy |
821 }, | 821 }, |
822 | 822 |
823 // Expected result. | 823 // Expected result. |
824 false, // auto_detect | 824 false, // auto_detect |
825 GURL(), // pac_url | 825 GURL(), // pac_url |
826 ProxyRulesExpectation::Single( | 826 ProxyRulesExpectation::Single( |
827 "socks4://socks.com:888", // single proxy | 827 "socks5://socks.com:888", // single proxy |
828 ""), // bypass rules | 828 ""), // bypass rules |
829 }, | 829 }, |
830 | 830 |
831 { | 831 { |
832 TEST_DESC("socks5"), | 832 TEST_DESC("socks4"), |
833 { // Input. | 833 { // Input. |
834 NULL, // DESKTOP_SESSION | 834 NULL, // DESKTOP_SESSION |
835 NULL, // HOME | 835 NULL, // HOME |
836 NULL, // KDEHOME | 836 NULL, // KDEHOME |
837 NULL, // KDE_SESSION_VERSION | 837 NULL, // KDE_SESSION_VERSION |
838 NULL, // auto_proxy | 838 NULL, // auto_proxy |
839 "", // all_proxy | 839 "", // all_proxy |
840 NULL, NULL, NULL, // per-proto proxies | 840 NULL, NULL, NULL, // per-proto proxies |
841 "socks.com:888", "5", // SOCKS | 841 "socks.com:888", "4", // SOCKS |
842 NULL, // no_proxy | 842 NULL, // no_proxy |
843 }, | 843 }, |
844 | 844 |
845 // Expected result. | 845 // Expected result. |
846 false, // auto_detect | 846 false, // auto_detect |
847 GURL(), // pac_url | 847 GURL(), // pac_url |
848 ProxyRulesExpectation::Single( | 848 ProxyRulesExpectation::Single( |
849 "socks5://socks.com:888", // single proxy | 849 "socks4://socks.com:888", // single proxy |
850 ""), // bypass rules | 850 ""), // bypass rules |
851 }, | 851 }, |
852 | 852 |
853 { | 853 { |
854 TEST_DESC("socks default port"), | 854 TEST_DESC("socks default port"), |
855 { // Input. | 855 { // Input. |
856 NULL, // DESKTOP_SESSION | 856 NULL, // DESKTOP_SESSION |
857 NULL, // HOME | 857 NULL, // HOME |
858 NULL, // KDEHOME | 858 NULL, // KDEHOME |
859 NULL, // KDE_SESSION_VERSION | 859 NULL, // KDE_SESSION_VERSION |
860 NULL, // auto_proxy | 860 NULL, // auto_proxy |
861 "", // all_proxy | 861 "", // all_proxy |
862 NULL, NULL, NULL, // per-proto proxies | 862 NULL, NULL, NULL, // per-proto proxies |
863 "socks.com", NULL, // SOCKS | 863 "socks.com", NULL, // SOCKS |
864 NULL, // no_proxy | 864 NULL, // no_proxy |
865 }, | 865 }, |
866 | 866 |
867 // Expected result. | 867 // Expected result. |
868 false, // auto_detect | 868 false, // auto_detect |
869 GURL(), // pac_url | 869 GURL(), // pac_url |
870 ProxyRulesExpectation::Single( | 870 ProxyRulesExpectation::Single( |
871 "socks4://socks.com:1080", // single proxy | 871 "socks5://socks.com:1080", // single proxy |
872 ""), // bypass rules | 872 ""), // bypass rules |
873 }, | 873 }, |
874 | 874 |
875 { | 875 { |
876 TEST_DESC("bypass"), | 876 TEST_DESC("bypass"), |
877 { // Input. | 877 { // Input. |
878 NULL, // DESKTOP_SESSION | 878 NULL, // DESKTOP_SESSION |
879 NULL, // HOME | 879 NULL, // HOME |
880 NULL, // KDEHOME | 880 NULL, // KDEHOME |
881 NULL, // KDE_SESSION_VERSION | 881 NULL, // KDE_SESSION_VERSION |
(...skipping 518 matching lines...) Loading... |
1400 new ProxyConfigServiceLinux(env)); | 1400 new ProxyConfigServiceLinux(env)); |
1401 ProxyConfig config; | 1401 ProxyConfig config; |
1402 sync_config_getter.SetupAndInitialFetch(); | 1402 sync_config_getter.SetupAndInitialFetch(); |
1403 sync_config_getter.SyncGetLatestProxyConfig(&config); | 1403 sync_config_getter.SyncGetLatestProxyConfig(&config); |
1404 EXPECT_TRUE(config.auto_detect()); | 1404 EXPECT_TRUE(config.auto_detect()); |
1405 EXPECT_EQ(GURL(), config.pac_url()); | 1405 EXPECT_EQ(GURL(), config.pac_url()); |
1406 } | 1406 } |
1407 } | 1407 } |
1408 | 1408 |
1409 } // namespace net | 1409 } // namespace net |
OLD | NEW |