OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "net/base/net_log_unittest.h" | 10 #include "net/base/net_log_unittest.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 virtual void OnError(int line_number, const string16& message) { | 57 virtual void OnError(int line_number, const string16& message) { |
58 // Helpful when debugging. | 58 // Helpful when debugging. |
59 LOG(INFO) << "PAC-error: [" << line_number << "] " << message; | 59 LOG(INFO) << "PAC-error: [" << line_number << "] " << message; |
60 | 60 |
61 errors.push_back(UTF16ToUTF8(message)); | 61 errors.push_back(UTF16ToUTF8(message)); |
62 errors_line_number.push_back(line_number); | 62 errors_line_number.push_back(line_number); |
63 } | 63 } |
64 | 64 |
65 virtual void Shutdown() {} | |
66 | |
67 // Mock values to return. | 65 // Mock values to return. |
68 std::string my_ip_address_result; | 66 std::string my_ip_address_result; |
69 std::string my_ip_address_ex_result; | 67 std::string my_ip_address_ex_result; |
70 std::string dns_resolve_result; | 68 std::string dns_resolve_result; |
71 std::string dns_resolve_ex_result; | 69 std::string dns_resolve_ex_result; |
72 | 70 |
73 // Inputs we got called with. | 71 // Inputs we got called with. |
74 std::vector<std::string> alerts; | 72 std::vector<std::string> alerts; |
75 std::vector<std::string> errors; | 73 std::vector<std::string> errors; |
76 std::vector<int> errors_line_number; | 74 std::vector<int> errors_line_number; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 | 567 |
570 ASSERT_EQ(1u, bindings->dns_resolves.size()); | 568 ASSERT_EQ(1u, bindings->dns_resolves.size()); |
571 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves[0]); | 569 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves[0]); |
572 | 570 |
573 ASSERT_EQ(1u, bindings->dns_resolves_ex.size()); | 571 ASSERT_EQ(1u, bindings->dns_resolves_ex.size()); |
574 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves_ex[0]); | 572 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves_ex[0]); |
575 } | 573 } |
576 | 574 |
577 } // namespace | 575 } // namespace |
578 } // namespace net | 576 } // namespace net |
OLD | NEW |