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

Side by Side Diff: ui/gfx/text_utils_unittest.cc

Issue 16051006: ui/gfx: Use base::string16 now that string16 was moved into base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « ui/gfx/text_utils.cc ('k') | no next file » | 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) 2011 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 "ui/gfx/text_utils.h" 5 #include "ui/gfx/text_utils.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 9
10 namespace gfx { 10 namespace gfx {
(...skipping 30 matching lines...) Expand all
41 { "Test\xF0\x9D\x92\x9C&ing", 6, 1, "Test\xF0\x9D\x92\x9Cing" }, 41 { "Test\xF0\x9D\x92\x9C&ing", 6, 1, "Test\xF0\x9D\x92\x9Cing" },
42 { "Test&\xF0\x9D\x92\x9C&ing", 6, 1, "Test\xF0\x9D\x92\x9Cing" }, 42 { "Test&\xF0\x9D\x92\x9C&ing", 6, 1, "Test\xF0\x9D\x92\x9Cing" },
43 { "Test&\xF0\x9D\x92\x9C&&ing", 4, 2, "Test\xF0\x9D\x92\x9C&ing" }, 43 { "Test&\xF0\x9D\x92\x9C&&ing", 4, 2, "Test\xF0\x9D\x92\x9C&ing" },
44 { "Test&\xF0\x9D\x92\x9C&\xF0\x9D\x92\x9Cing", 6, 2, 44 { "Test&\xF0\x9D\x92\x9C&\xF0\x9D\x92\x9Cing", 6, 2,
45 "Test\xF0\x9D\x92\x9C\xF0\x9D\x92\x9Cing" }, 45 "Test\xF0\x9D\x92\x9C\xF0\x9D\x92\x9Cing" },
46 }; 46 };
47 47
48 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 48 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
49 int accelerated_char_pos; 49 int accelerated_char_pos;
50 int accelerated_char_span; 50 int accelerated_char_span;
51 string16 result = RemoveAcceleratorChar(UTF8ToUTF16(cases[i].input), 51 base::string16 result = RemoveAcceleratorChar(UTF8ToUTF16(cases[i].input),
52 kAcceleratorChar, 52 kAcceleratorChar,
53 &accelerated_char_pos, 53 &accelerated_char_pos,
54 &accelerated_char_span); 54 &accelerated_char_span);
55 EXPECT_EQ(result, UTF8ToUTF16(cases[i].output)); 55 EXPECT_EQ(result, UTF8ToUTF16(cases[i].output));
56 EXPECT_EQ(accelerated_char_pos, cases[i].accelerated_char_pos); 56 EXPECT_EQ(accelerated_char_pos, cases[i].accelerated_char_pos);
57 EXPECT_EQ(accelerated_char_span, cases[i].accelerated_char_span); 57 EXPECT_EQ(accelerated_char_span, cases[i].accelerated_char_span);
58 } 58 }
59 } 59 }
60 60
61 } // namespace 61 } // namespace
62 } // namespace gfx 62 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/text_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698