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/ScriptRunIterator.h" | 5 #include "platform/fonts/ScriptRunIterator.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "wtf/Assertions.h" | 8 #include "wtf/Assertions.h" |
9 #include "wtf/Threading.h" | 9 #include "wtf/Threading.h" |
10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 TEST_F(ScriptRunIteratorTest, Whitespace) | 356 TEST_F(ScriptRunIteratorTest, Whitespace) |
357 { | 357 { |
358 CHECK_RUNS({ { " \t ", USCRIPT_COMMON } }); | 358 CHECK_RUNS({ { " \t ", USCRIPT_COMMON } }); |
359 } | 359 } |
360 | 360 |
361 TEST_F(ScriptRunIteratorTest, Common) | 361 TEST_F(ScriptRunIteratorTest, Common) |
362 { | 362 { |
363 CHECK_RUNS({ { " ... !?", USCRIPT_COMMON } }); | 363 CHECK_RUNS({ { " ... !?", USCRIPT_COMMON } }); |
364 } | 364 } |
365 | 365 |
| 366 TEST_F(ScriptRunIteratorTest, CombiningCircle) |
| 367 { |
| 368 CHECK_RUNS({ { "◌́◌̀◌̈◌̂◌̄◌̊", USCRIPT_COMMON } }); |
| 369 } |
| 370 |
| 371 |
366 TEST_F(ScriptRunIteratorTest, Latin) | 372 TEST_F(ScriptRunIteratorTest, Latin) |
367 { | 373 { |
368 CHECK_RUNS({ { "latin", USCRIPT_LATIN } }); | 374 CHECK_RUNS({ { "latin", USCRIPT_LATIN } }); |
369 } | 375 } |
370 | 376 |
371 TEST_F(ScriptRunIteratorTest, Chinese) | 377 TEST_F(ScriptRunIteratorTest, Chinese) |
372 { | 378 { |
373 CHECK_RUNS({ { "萬國碼", USCRIPT_HAN } }); | 379 CHECK_RUNS({ { "萬國碼", USCRIPT_HAN } }); |
374 } | 380 } |
375 | 381 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 } | 745 } |
740 } | 746 } |
741 } | 747 } |
742 | 748 |
743 // ZWJ is \u200D Cf (Format, other) and its script is inherited. I'm going to | 749 // ZWJ is \u200D Cf (Format, other) and its script is inherited. I'm going to |
744 // ignore this for now, as I think it shouldn't matter which run it ends up | 750 // ignore this for now, as I think it shouldn't matter which run it ends up |
745 // in. HarfBuzz needs to be able to use it as context and shape each | 751 // in. HarfBuzz needs to be able to use it as context and shape each |
746 // neighboring character appropriately no matter what run it got assigned to. | 752 // neighboring character appropriately no matter what run it got assigned to. |
747 | 753 |
748 } // namespace blink | 754 } // namespace blink |
OLD | NEW |