| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/android/url_sanitize_utils.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace chrome { |
| 10 namespace android { |
| 11 |
| 12 class UrlSanitizeUtilsTest : public testing::Test {}; |
| 13 |
| 14 TEST_F(UrlSanitizeUtilsTest, SanitizeUrl) { |
| 15 EXPECT_EQ("http://example.com/path%5B%5D/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C", |
| 16 SanitizeUrl(GURL("http://example.com/path[]/" |
| 17 "sub?q=a|b|c&q=1|2|3#ref|")).spec()); |
| 18 |
| 19 EXPECT_EQ("http://example.com/path%5B%5D/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C", |
| 20 SanitizeUrl(GURL("http://example.com/path%5B%5D/" |
| 21 "sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C")).spec()); |
| 22 |
| 23 EXPECT_EQ("http://example.com/", |
| 24 SanitizeUrl(GURL("http://example.com/")).spec()); |
| 25 } |
| 26 |
| 27 } // namespace android |
| 28 } // namespace chrome |
| OLD | NEW |