| 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 "chrome/browser/ui/elide_url.h" | 5 #include "chrome/browser/ui/elide_url.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/gfx/font_list.h" | 9 #include "ui/gfx/font_list.h" |
| 10 #include "ui/gfx/text_elider.h" | 10 #include "ui/gfx/text_elider.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Trying to elide to a really short length will still keep the full TLD+1 | 192 // Trying to elide to a really short length will still keep the full TLD+1 |
| 193 EXPECT_EQ(base::ASCIIToUTF16("google.com"), | 193 EXPECT_EQ(base::ASCIIToUTF16("google.com"), |
| 194 ElideHost(GURL("http://google.com"), gfx::FontList(), 2)); | 194 ElideHost(GURL("http://google.com"), gfx::FontList(), 2)); |
| 195 EXPECT_EQ(base::UTF8ToUTF16(kEllipsisStr + ".google.com"), | 195 EXPECT_EQ(base::UTF8ToUTF16(kEllipsisStr + ".google.com"), |
| 196 ElideHost(GURL("http://subdomain.google.com"), gfx::FontList(), 2)); | 196 ElideHost(GURL("http://subdomain.google.com"), gfx::FontList(), 2)); |
| 197 EXPECT_EQ(base::ASCIIToUTF16("foo.bar"), | 197 EXPECT_EQ(base::ASCIIToUTF16("foo.bar"), |
| 198 ElideHost(GURL("http://foo.bar"), gfx::FontList(), 2)); | 198 ElideHost(GURL("http://foo.bar"), gfx::FontList(), 2)); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace | 201 } // namespace |
| OLD | NEW |