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

Side by Side Diff: ui/gfx/render_text_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, 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 | « third_party/zlib/google/zip_reader.cc ('k') | ui/gfx/text_elider_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gfx/render_text.h" 5 #include "ui/gfx/render_text.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 11 matching lines...) Expand all
22 22
23 #if defined(OS_LINUX) && !defined(USE_OZONE) 23 #if defined(OS_LINUX) && !defined(USE_OZONE)
24 #include "ui/gfx/render_text_pango.h" 24 #include "ui/gfx/render_text_pango.h"
25 #endif 25 #endif
26 26
27 #if defined(TOOLKIT_GTK) 27 #if defined(TOOLKIT_GTK)
28 #include <gtk/gtk.h> 28 #include <gtk/gtk.h>
29 #endif 29 #endif
30 30
31 using base::ASCIIToUTF16; 31 using base::ASCIIToUTF16;
32 using base::UTF8ToUTF16;
32 using base::WideToUTF16; 33 using base::WideToUTF16;
33 34
34 namespace gfx { 35 namespace gfx {
35 36
36 namespace { 37 namespace {
37 38
38 // Various weak, LTR, RTL, and Bidi string cases with three characters each. 39 // Various weak, LTR, RTL, and Bidi string cases with three characters each.
39 const wchar_t kWeak[] = L" . "; 40 const wchar_t kWeak[] = L" . ";
40 const wchar_t kLtr[] = L"abc"; 41 const wchar_t kLtr[] = L"abc";
41 const wchar_t kRtl[] = L"\x5d0\x5d1\x5d2"; 42 const wchar_t kRtl[] = L"\x5d0\x5d1\x5d2";
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 render_text->SetText(WideToUTF16(L"x \x25B6 y")); 1804 render_text->SetText(WideToUTF16(L"x \x25B6 y"));
1804 render_text->EnsureLayout(); 1805 render_text->EnsureLayout();
1805 ASSERT_EQ(3U, render_text->runs_.size()); 1806 ASSERT_EQ(3U, render_text->runs_.size());
1806 EXPECT_EQ(Range(0, 2), render_text->runs_[0]->range); 1807 EXPECT_EQ(Range(0, 2), render_text->runs_[0]->range);
1807 EXPECT_EQ(Range(2, 3), render_text->runs_[1]->range); 1808 EXPECT_EQ(Range(2, 3), render_text->runs_[1]->range);
1808 EXPECT_EQ(Range(3, 5), render_text->runs_[2]->range); 1809 EXPECT_EQ(Range(3, 5), render_text->runs_[2]->range);
1809 } 1810 }
1810 #endif // defined(OS_WIN) 1811 #endif // defined(OS_WIN)
1811 1812
1812 } // namespace gfx 1813 } // namespace gfx
OLDNEW
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | ui/gfx/text_elider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698