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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SymbolsIteratorTest.cpp

Issue 2386333002: reflow comments in platform/fonts (Closed)
Patch Set: comments Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "platform/fonts/SymbolsIterator.h" 5 #include "platform/fonts/SymbolsIterator.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include <string> 8 #include <string>
9 9
10 namespace blink { 10 namespace blink {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 TEST_F(SymbolsIteratorTest, EmojiZWSSequences) { 134 TEST_F(SymbolsIteratorTest, EmojiZWSSequences) {
135 CHECK_RUNS({{"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ", 135 CHECK_RUNS({{"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ",
136 FontFallbackPriority::EmojiEmoji}, 136 FontFallbackPriority::EmojiEmoji},
137 {"abcd", FontFallbackPriority::Text}, 137 {"abcd", FontFallbackPriority::Text},
138 {"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€", FontFallbackPriority::EmojiEmoji}, 138 {"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€", FontFallbackPriority::EmojiEmoji},
139 {"efgh", FontFallbackPriority::Text}}); 139 {"efgh", FontFallbackPriority::Text}});
140 } 140 }
141 141
142 TEST_F(SymbolsIteratorTest, AllEmojiZWSSequences) { 142 TEST_F(SymbolsIteratorTest, AllEmojiZWSSequences) {
143 // clang-format gets confused by Emojis, http://llvm.org/PR30530
144 // clang-format off
143 CHECK_RUNS( 145 CHECK_RUNS(
144 {{"๐Ÿ’๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ๐Ÿ‘จโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘ฉ๐Ÿ’‘๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ‘จ๐Ÿ‘จโ€โค๏ธ" 146 {{"๐Ÿ’๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ๐Ÿ‘จโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘ฉ๐Ÿ’‘๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ‘จ๐Ÿ‘จโ€โค"
147 "๏ธ"
145 "โ€๐Ÿ‘จ๐Ÿ‘ฉโ€โค๏ธ" 148 "โ€๐Ÿ‘จ๐Ÿ‘ฉโ€โค๏ธ"
146 "โ€๐Ÿ‘ฉ๐Ÿ‘ช๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘จโ€" 149 "โ€๐Ÿ‘ฉ๐Ÿ‘ช๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘จ"
147 "๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€" 150 "โ€"
151 "๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง"
152 "โ€"
148 "๐Ÿ‘ง" 153 "๐Ÿ‘ง"
149 "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘โ€" 154 "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘"
155 "โ€"
150 "๐Ÿ—จ", 156 "๐Ÿ—จ",
151 FontFallbackPriority::EmojiEmoji}}); 157 FontFallbackPriority::EmojiEmoji}});
158 // clang-format on
152 } 159 }
153 160
154 TEST_F(SymbolsIteratorTest, ModifierPlusGender) { 161 TEST_F(SymbolsIteratorTest, ModifierPlusGender) {
155 CHECK_RUNS({{"โ›น๐Ÿปโ€โ™‚", FontFallbackPriority::EmojiEmoji}}); 162 CHECK_RUNS({{"โ›น๐Ÿปโ€โ™‚", FontFallbackPriority::EmojiEmoji}});
156 } 163 }
157 164
158 TEST_F(SymbolsIteratorTest, TextMemberZwjSequence) { 165 TEST_F(SymbolsIteratorTest, TextMemberZwjSequence) {
159 CHECK_RUNS({{"๐Ÿ‘จโ€โš•", FontFallbackPriority::EmojiEmoji}}); 166 CHECK_RUNS({{"๐Ÿ‘จโ€โš•", FontFallbackPriority::EmojiEmoji}});
160 } 167 }
161 168
(...skipping 26 matching lines...) Expand all
188 "\x9D\xA4\xEF\xB8\x8F\xE2\x80\x8D" 195 "\x9D\xA4\xEF\xB8\x8F\xE2\x80\x8D"
189 "\xF0\x9F\x92\x8B\xE2\x80\x8D\xF0\x9F\x91\xA8", 196 "\xF0\x9F\x92\x8B\xE2\x80\x8D\xF0\x9F\x91\xA8",
190 FontFallbackPriority::EmojiEmoji}}); 197 FontFallbackPriority::EmojiEmoji}});
191 } 198 }
192 199
193 TEST_F(SymbolsIteratorTest, Arrows) { 200 TEST_F(SymbolsIteratorTest, Arrows) {
194 CHECK_RUNS({{"xโ†’โ†xโ†โ†‘โ†“โ†’", FontFallbackPriority::Text}}); 201 CHECK_RUNS({{"xโ†’โ†xโ†โ†‘โ†“โ†’", FontFallbackPriority::Text}});
195 } 202 }
196 203
197 } // namespace blink 204 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698