| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/text_elider.h" | 5 #include "app/text_elider.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/scoped_ptr.h" |
| 8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 9 #include "gfx/font.h" | 10 #include "gfx/font.h" |
| 10 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 const wchar_t kEllipsis[] = L"\x2026"; | 16 const wchar_t kEllipsis[] = L"\x2026"; |
| 16 | 17 |
| 17 struct Testcase { | 18 struct Testcase { |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 { "http://www.a/", "http://b/", -1 }, | 285 { "http://www.a/", "http://b/", -1 }, |
| 285 }; | 286 }; |
| 286 | 287 |
| 287 for (size_t i = 0; i < arraysize(tests); ++i) { | 288 for (size_t i = 0; i < arraysize(tests); ++i) { |
| 288 gfx::SortedDisplayURL url1(GURL(tests[i].a), std::wstring()); | 289 gfx::SortedDisplayURL url1(GURL(tests[i].a), std::wstring()); |
| 289 gfx::SortedDisplayURL url2(GURL(tests[i].b), std::wstring()); | 290 gfx::SortedDisplayURL url2(GURL(tests[i].b), std::wstring()); |
| 290 EXPECT_EQ(tests[i].compare_result, url1.Compare(url2, collator.get())); | 291 EXPECT_EQ(tests[i].compare_result, url1.Compare(url2, collator.get())); |
| 291 EXPECT_EQ(-tests[i].compare_result, url2.Compare(url1, collator.get())); | 292 EXPECT_EQ(-tests[i].compare_result, url2.Compare(url1, collator.get())); |
| 292 } | 293 } |
| 293 } | 294 } |
| OLD | NEW |