| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 "[2001:0db8:85a3:0000:0000:8a2e:0370:7334]"}, | 663 "[2001:0db8:85a3:0000:0000:8a2e:0370:7334]"}, |
| 664 {"2001:db8:85a3:0:0:8a2e:370:7334", "[2001:db8:85a3:0:0:8a2e:370:7334]"}, | 664 {"2001:db8:85a3:0:0:8a2e:370:7334", "[2001:db8:85a3:0:0:8a2e:370:7334]"}, |
| 665 {"2001:db8:85a3::8a2e:370:7334", "[2001:db8:85a3::8a2e:370:7334]"}, | 665 {"2001:db8:85a3::8a2e:370:7334", "[2001:db8:85a3::8a2e:370:7334]"}, |
| 666 {"::ffff:192.0.2.128", "[::ffff:192.0.2.128]"}}; | 666 {"::ffff:192.0.2.128", "[::ffff:192.0.2.128]"}}; |
| 667 | 667 |
| 668 for (const auto& test : cases) { | 668 for (const auto& test : cases) { |
| 669 SCOPED_TRACE(test.ip); | 669 SCOPED_TRACE(test.ip); |
| 670 content::ResourceResponseInfo info; | 670 content::ResourceResponseInfo info; |
| 671 info.socket_address = net::HostPortPair(test.ip, 443); | 671 info.socket_address = net::HostPortPair(test.ip, 443); |
| 672 blink::WebURLResponse response; | 672 blink::WebURLResponse response; |
| 673 response.initialize(); | |
| 674 WebURLLoaderImpl::PopulateURLResponse(url, info, &response, true); | 673 WebURLLoaderImpl::PopulateURLResponse(url, info, &response, true); |
| 675 EXPECT_EQ(test.expected, response.remoteIPAddress().utf8()); | 674 EXPECT_EQ(test.expected, response.remoteIPAddress().utf8()); |
| 676 }; | 675 }; |
| 677 } | 676 } |
| 678 | 677 |
| 679 } // namespace | 678 } // namespace |
| 680 } // namespace content | 679 } // namespace content |
| OLD | NEW |