| Index: chrome/browser/android/url_sanitize_utils_unittest.cc
|
| diff --git a/chrome/browser/android/url_sanitize_utils_unittest.cc b/chrome/browser/android/url_sanitize_utils_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0c06ca91e783ef207eb2be7feb761e90b8a4e534
|
| --- /dev/null
|
| +++ b/chrome/browser/android/url_sanitize_utils_unittest.cc
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/android/url_sanitize_utils.h"
|
| +
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace chrome {
|
| +namespace android {
|
| +
|
| +class UrlSanitizeUtilsTest : public testing::Test {};
|
| +
|
| +TEST_F(UrlSanitizeUtilsTest, SanitizeUrl) {
|
| + EXPECT_EQ("http://example.com/path%5B%5D/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C",
|
| + SanitizeUrl(GURL("http://example.com/path[]/"
|
| + "sub?q=a|b|c&q=1|2|3#ref|")).spec());
|
| +
|
| + EXPECT_EQ("http://example.com/path%5B%5D/sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C",
|
| + SanitizeUrl(GURL("http://example.com/path%5B%5D/"
|
| + "sub?q=a%7Cb%7Cc&q=1%7C2%7C3#ref%7C")).spec());
|
| +
|
| + EXPECT_EQ("http://example.com/",
|
| + SanitizeUrl(GURL("http://example.com/")).spec());
|
| +}
|
| +
|
| +} // namespace android
|
| +} // namespace chrome
|
|
|