OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "net/base/escape.h" | 8 #include "net/base/escape.h" |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
12 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 | 14 |
16 namespace net { | 15 namespace net { |
17 namespace { | 16 namespace { |
18 | 17 |
19 struct EscapeCase { | 18 struct EscapeCase { |
20 const char* input; | 19 const char* input; |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 "http://example.com/path/sub?q=a|b|c&q=1|2|3#ref|")); | 546 "http://example.com/path/sub?q=a|b|c&q=1|2|3#ref|")); |
548 ASSERT_EQ("http://example.com/path/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C", | 547 ASSERT_EQ("http://example.com/path/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C", |
549 EscapeExternalHandlerValue( | 548 EscapeExternalHandlerValue( |
550 "http://example.com/path/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C")); | 549 "http://example.com/path/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C")); |
551 ASSERT_EQ("http://[2001:db8:0:1]:80", | 550 ASSERT_EQ("http://[2001:db8:0:1]:80", |
552 EscapeExternalHandlerValue("http://[2001:db8:0:1]:80")); | 551 EscapeExternalHandlerValue("http://[2001:db8:0:1]:80")); |
553 } | 552 } |
554 | 553 |
555 } // namespace | 554 } // namespace |
556 } // namespace net | 555 } // namespace net |
OLD | NEW |