Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: ui/base/text/text_elider_unittest.cc

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/text/text_elider.cc ('k') | ui/base/theme_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
6 #include "base/file_path.h" 5 #include "base/file_path.h"
7 #include "base/i18n/rtl.h" 6 #include "base/i18n/rtl.h"
8 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
9 #include "base/string_util.h" 8 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
11 #include "gfx/font.h" 10 #include "gfx/font.h"
12 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/base/text/text_elider.h"
14
15 namespace ui {
14 16
15 namespace { 17 namespace {
16 18
17 const wchar_t kEllipsis[] = L"\x2026"; 19 const wchar_t kEllipsis[] = L"\x2026";
18 20
19 struct Testcase { 21 struct Testcase {
20 const std::string input; 22 const std::string input;
21 const std::wstring output; 23 const std::wstring output;
22 }; 24 };
23 25
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 "\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C" 432 "\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C"
431 " aaaaa")); 433 " aaaaa"));
432 const string16 out(UTF8ToUTF16( 434 const string16 out(UTF8ToUTF16(
433 "\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\n" 435 "\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\n"
434 "\xF0\x9D\x92\x9C \naaa\n...")); 436 "\xF0\x9D\x92\x9C \naaa\n..."));
435 string16 output; 437 string16 output;
436 EXPECT_TRUE(gfx::ElideRectangleString(str, 3, 3, &output)); 438 EXPECT_TRUE(gfx::ElideRectangleString(str, 3, 3, &output));
437 EXPECT_EQ(out, output); 439 EXPECT_EQ(out, output);
438 } 440 }
439 441
442 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/text/text_elider.cc ('k') | ui/base/theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698