| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 9 #include "components/proxy_config/proxy_config_dictionary.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 struct ProxyConfigHolder { | 12 struct ProxyConfigHolder { |
| 13 ProxyPrefs::ProxyMode mode; | 13 ProxyPrefs::ProxyMode mode; |
| 14 std::string pac_url; | 14 std::string pac_url; |
| 15 std::string proxy_server; | 15 std::string proxy_server; |
| 16 std::string bypass_list; | 16 std::string bypass_list; |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 TEST(ProxyConfigDictionaryTest, CreateDirect) { | 19 TEST(ProxyConfigDictionaryTest, CreateDirect) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 ProxyConfigDictionary::CreateSystem()); | 77 ProxyConfigDictionary::CreateSystem()); |
| 78 ProxyConfigDictionary dict(dict_value.get()); | 78 ProxyConfigDictionary dict(dict_value.get()); |
| 79 ProxyConfigHolder h; | 79 ProxyConfigHolder h; |
| 80 | 80 |
| 81 ASSERT_TRUE(dict.GetMode(&h.mode)); | 81 ASSERT_TRUE(dict.GetMode(&h.mode)); |
| 82 EXPECT_EQ(ProxyPrefs::MODE_SYSTEM, h.mode); | 82 EXPECT_EQ(ProxyPrefs::MODE_SYSTEM, h.mode); |
| 83 ASSERT_FALSE(dict.GetPacUrl(&h.bypass_list)); | 83 ASSERT_FALSE(dict.GetPacUrl(&h.bypass_list)); |
| 84 ASSERT_FALSE(dict.GetProxyServer(&h.proxy_server)); | 84 ASSERT_FALSE(dict.GetProxyServer(&h.proxy_server)); |
| 85 ASSERT_FALSE(dict.GetBypassList(&h.bypass_list)); | 85 ASSERT_FALSE(dict.GetBypassList(&h.bypass_list)); |
| 86 } | 86 } |
| OLD | NEW |