Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 TEST_F(SymbolsIteratorTest, Arrows) { | 216 TEST_F(SymbolsIteratorTest, Arrows) { |
| 217 CHECK_RUNS({{"x→←x←↑↓→", FontFallbackPriority::kText}}); | 217 CHECK_RUNS({{"x→←x←↑↓→", FontFallbackPriority::kText}}); |
| 218 } | 218 } |
| 219 | 219 |
| 220 TEST_F(SymbolsIteratorTest, JudgePilot) { | 220 TEST_F(SymbolsIteratorTest, JudgePilot) { |
| 221 CHECK_RUNS({{"👨⚖️👩⚖️👨🏼⚖️👩🏼⚖️", | 221 CHECK_RUNS({{"👨⚖️👩⚖️👨🏼⚖️👩🏼⚖️", |
| 222 FontFallbackPriority::kEmojiEmoji}}); | 222 FontFallbackPriority::kEmojiEmoji}}); |
| 223 } | 223 } |
| 224 | 224 |
| 225 // Extracted from http://unicode.org/emoji/charts/emoji-released.html for Emoji | 225 // Extracted from http://unicode.org/emoji/charts/emoji-released.html for Emoji |
| 226 // v5.0, except for the subdivision-flag section. Currently blocked on ICU 59 | 226 // v5.0, except for the subdivision-flag section. |
| 227 // upgrade, TODO(jshin): crbug.com/699469 | |
| 228 // Before ICU 59 new emoji sequences and new single emoji are not detected as | 227 // Before ICU 59 new emoji sequences and new single emoji are not detected as |
| 229 // emoji type text and sequences get split up in the middle so that shaping | 228 // emoji type text and sequences get split up in the middle so that shaping |
| 230 // cannot form the right glyph from the emoji font. Running this as one run in | 229 // cannot form the right glyph from the emoji font. Running this as one run in |
| 231 // one test ensures that the new emoji form an unbroken emoji-type sequence. | 230 // one test ensures that the new emoji form an unbroken emoji-type sequence. |
| 232 TEST_F(SymbolsIteratorTest, DISABLED_Emoji5AdditionsExceptFlags) { | 231 TEST_F(SymbolsIteratorTest, Emoji5AdditionsExceptFlags) { |
|
drott
2017/05/15 06:31:18
Thank you!
| |
| 233 CHECK_RUNS( | 232 CHECK_RUNS( |
| 234 {{"\xF0\x9F\xA7\x94\xF0\x9F\x8F\xBB\xF0\x9F\xA7\x94\xF0\x9F\x8F\xBC\xF0" | 233 {{"\xF0\x9F\xA7\x94\xF0\x9F\x8F\xBB\xF0\x9F\xA7\x94\xF0\x9F\x8F\xBC\xF0" |
| 235 "\x9F\xA7\x94\xF0\x9F\x8F\xBD\xF0\x9F\xA7\x94\xF0\x9F\x8F\xBE\xF0\x9F" | 234 "\x9F\xA7\x94\xF0\x9F\x8F\xBD\xF0\x9F\xA7\x94\xF0\x9F\x8F\xBE\xF0\x9F" |
| 236 "\xA7\x94\xF0\x9F\x8F\xBF\xF0\x9F\xA4\xB1\xF0\x9F\xA4\xB1\xF0\x9F\x8F" | 235 "\xA7\x94\xF0\x9F\x8F\xBF\xF0\x9F\xA4\xB1\xF0\x9F\xA4\xB1\xF0\x9F\x8F" |
| 237 "\xBB\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBC\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBD" | 236 "\xBB\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBC\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBD" |
| 238 "\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBE\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBF\xF0" | 237 "\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBE\xF0\x9F\xA4\xB1\xF0\x9F\x8F\xBF\xF0" |
| 239 "\x9F\xA7\x99\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBB\xF0\x9F\xA7\x99\xF0\x9F" | 238 "\x9F\xA7\x99\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBB\xF0\x9F\xA7\x99\xF0\x9F" |
| 240 "\x8F\xBC\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBD\xF0\x9F\xA7\x99\xF0\x9F\x8F" | 239 "\x8F\xBC\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBD\xF0\x9F\xA7\x99\xF0\x9F\x8F" |
| 241 "\xBE\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBF\xF0\x9F\xA7\x99\xE2\x80\x8D\xE2" | 240 "\xBE\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBF\xF0\x9F\xA7\x99\xE2\x80\x8D\xE2" |
| 242 "\x99\x80\xEF\xB8\x8F\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBB\xE2\x80\x8D\xE2" | 241 "\x99\x80\xEF\xB8\x8F\xF0\x9F\xA7\x99\xF0\x9F\x8F\xBB\xE2\x80\x8D\xE2" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 362 "\xF0\x9F\xA7\xA2\xF0\x9F\xA6\x93\xF0\x9F\xA6\x92\xF0\x9F\xA6\x94\xF0" | 361 "\xF0\x9F\xA7\xA2\xF0\x9F\xA6\x93\xF0\x9F\xA6\x92\xF0\x9F\xA6\x94\xF0" |
| 363 "\x9F\xA6\x95\xF0\x9F\xA6\x96\xF0\x9F\xA6\x97\xF0\x9F\xA5\xA5\xF0\x9F" | 362 "\x9F\xA6\x95\xF0\x9F\xA6\x96\xF0\x9F\xA6\x97\xF0\x9F\xA5\xA5\xF0\x9F" |
| 364 "\xA5\xA6\xF0\x9F\xA5\xA8\xF0\x9F\xA5\xA9\xF0\x9F\xA5\xAA\xF0\x9F\xA5" | 363 "\xA5\xA6\xF0\x9F\xA5\xA8\xF0\x9F\xA5\xA9\xF0\x9F\xA5\xAA\xF0\x9F\xA5" |
| 365 "\xA3\xF0\x9F\xA5\xAB\xF0\x9F\xA5\x9F\xF0\x9F\xA5\xA0\xF0\x9F\xA5\xA1" | 364 "\xA3\xF0\x9F\xA5\xAB\xF0\x9F\xA5\x9F\xF0\x9F\xA5\xA0\xF0\x9F\xA5\xA1" |
| 366 "\xF0\x9F\xA5\xA7\xF0\x9F\xA5\xA4\xF0\x9F\xA5\xA2\xF0\x9F\x9B\xB8\xF0" | 365 "\xF0\x9F\xA5\xA7\xF0\x9F\xA5\xA4\xF0\x9F\xA5\xA2\xF0\x9F\x9B\xB8\xF0" |
| 367 "\x9F\x9B\xB7\xF0\x9F\xA5\x8C", | 366 "\x9F\x9B\xB7\xF0\x9F\xA5\x8C", |
| 368 FontFallbackPriority::kEmojiEmoji}}); | 367 FontFallbackPriority::kEmojiEmoji}}); |
| 369 } | 368 } |
| 370 | 369 |
| 371 } // namespace blink | 370 } // namespace blink |
| OLD | NEW |