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

Side by Side Diff: ui/views/corewm/tooltip_aura_unittest.cc

Issue 102993018: Remove UTF string conversion functions from the global namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aaaaaaaaaa Created 6 years, 12 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/gfx/text_elider_unittest.cc ('k') | ui/views/examples/label_example.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/views/corewm/tooltip_aura.h" 5 #include "ui/views/corewm/tooltip_aura.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.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"
11 #include "ui/gfx/text_utils.h" 11 #include "ui/gfx/text_utils.h"
12 #include "ui/views/test/views_test_base.h" 12 #include "ui/views/test/views_test_base.h"
13 13
14 using base::ASCIIToUTF16; 14 using base::ASCIIToUTF16;
15 using base::UTF8ToUTF16;
15 16
16 namespace views { 17 namespace views {
17 namespace corewm { 18 namespace corewm {
18 19
19 typedef ViewsTestBase TooltipAuraTest; 20 typedef ViewsTestBase TooltipAuraTest;
20 21
21 TEST_F(TooltipAuraTest, TrimTooltipToFitTests) { 22 TEST_F(TooltipAuraTest, TrimTooltipToFitTests) {
22 const gfx::FontList font_list; 23 const gfx::FontList font_list;
23 const int max_width = 4000; 24 const int max_width = 4000;
24 base::string16 tooltip; 25 base::string16 tooltip;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 TooltipAura::TrimTooltipToFit(font_list, max_width, &tooltip, &width, 123 TooltipAura::TrimTooltipToFit(font_list, max_width, &tooltip, &width,
123 &line_count); 124 &line_count);
124 EXPECT_EQ(gfx::GetStringWidth(ASCIIToUTF16("Small Tool t\tip"), font_list), 125 EXPECT_EQ(gfx::GetStringWidth(ASCIIToUTF16("Small Tool t\tip"), font_list),
125 width); 126 width);
126 EXPECT_EQ(1, line_count); 127 EXPECT_EQ(1, line_count);
127 EXPECT_EQ(ASCIIToUTF16("Small Tool t\tip"), tooltip); 128 EXPECT_EQ(ASCIIToUTF16("Small Tool t\tip"), tooltip);
128 } 129 }
129 130
130 } // namespace corewm 131 } // namespace corewm
131 } // namespace views 132 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/text_elider_unittest.cc ('k') | ui/views/examples/label_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698