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

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

Issue 2603343002: Emoji fixes: Two professions and digits with VS16 (Closed)
Patch Set: Created 3 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // missing a \U000... prefix for example. 101 // missing a \U000... prefix for example.
102 CHECK_RUNS({{"abcdef0123456789ABCDEF", FontFallbackPriority::Text}}); 102 CHECK_RUNS({{"abcdef0123456789ABCDEF", FontFallbackPriority::Text}});
103 } 103 }
104 104
105 TEST_F(SymbolsIteratorTest, NumbersAndHashNormalAndEmoji) { 105 TEST_F(SymbolsIteratorTest, NumbersAndHashNormalAndEmoji) {
106 CHECK_RUNS({{"0123456789#*", FontFallbackPriority::Text}, 106 CHECK_RUNS({{"0123456789#*", FontFallbackPriority::Text},
107 {"0⃣1⃣2⃣3⃣4⃣5⃣6⃣7⃣8⃣9⃣*⃣", FontFallbackPriority::EmojiEmoji}, 107 {"0⃣1⃣2⃣3⃣4⃣5⃣6⃣7⃣8⃣9⃣*⃣", FontFallbackPriority::EmojiEmoji},
108 {"0123456789#*", FontFallbackPriority::Text}}); 108 {"0123456789#*", FontFallbackPriority::Text}});
109 } 109 }
110 110
111 TEST_F(SymbolsIteratorTest, VS16onDigits) {
112 CHECK_RUNS({{"#", FontFallbackPriority::Text},
113 {"#\uFE0F#\uFE0F\u20E3", FontFallbackPriority::EmojiEmoji},
114 {"#", FontFallbackPriority::Text}});
115 }
116
111 TEST_F(SymbolsIteratorTest, SingleFlag) { 117 TEST_F(SymbolsIteratorTest, SingleFlag) {
112 CHECK_RUNS({{"🇺", FontFallbackPriority::Text}}); 118 CHECK_RUNS({{"🇺", FontFallbackPriority::Text}});
113 } 119 }
114 120
115 TEST_F(SymbolsIteratorTest, CombiningCircle) { 121 TEST_F(SymbolsIteratorTest, CombiningCircle) {
116 CHECK_RUNS({{"◌́◌̀◌̈◌̂◌̄◌̊", FontFallbackPriority::Text}}); 122 CHECK_RUNS({{"◌́◌̀◌̈◌̂◌̄◌̊", FontFallbackPriority::Text}});
117 } 123 }
118 124
119 // TODO: Perhaps check for invalid country indicator combinations? 125 // TODO: Perhaps check for invalid country indicator combinations?
120 126
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 {"\xF0\x9F\x91\xA9\xE2\x80\x8D\xE2" 200 {"\xF0\x9F\x91\xA9\xE2\x80\x8D\xE2"
195 "\x9D\xA4\xEF\xB8\x8F\xE2\x80\x8D" 201 "\x9D\xA4\xEF\xB8\x8F\xE2\x80\x8D"
196 "\xF0\x9F\x92\x8B\xE2\x80\x8D\xF0\x9F\x91\xA8", 202 "\xF0\x9F\x92\x8B\xE2\x80\x8D\xF0\x9F\x91\xA8",
197 FontFallbackPriority::EmojiEmoji}}); 203 FontFallbackPriority::EmojiEmoji}});
198 } 204 }
199 205
200 TEST_F(SymbolsIteratorTest, Arrows) { 206 TEST_F(SymbolsIteratorTest, Arrows) {
201 CHECK_RUNS({{"x→←x←↑↓→", FontFallbackPriority::Text}}); 207 CHECK_RUNS({{"x→←x←↑↓→", FontFallbackPriority::Text}});
202 } 208 }
203 209
210 TEST_F(SymbolsIteratorTest, JudgePilot) {
211 CHECK_RUNS({{"👨‍⚖️👩‍⚖️👨🏼‍⚖️👩🏼‍⚖️",
212 FontFallbackPriority::EmojiEmoji}});
213 }
214
204 } // namespace blink 215 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698