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

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

Issue 1422503010: Add script segmentation test for Common + Malayalam (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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 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 "config.h" 5 #include "config.h"
6 #include "platform/fonts/ScriptRunIterator.h" 6 #include "platform/fonts/ScriptRunIterator.h"
7 7
8 #include "platform/Logging.h" 8 #include "platform/Logging.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 #include "wtf/Threading.h" 10 #include "wtf/Threading.h"
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // DEVANAGARI STRESS SIGN UDATTA \xE0\xA5\x91 721 // DEVANAGARI STRESS SIGN UDATTA \xE0\xA5\x91
722 // ARABIC FATHATAN \xD9\x8B 722 // ARABIC FATHATAN \xD9\x8B
723 CHECK_RUNS({ { "\xE0\xA5\x91\xD9\x8B萬國碼", USCRIPT_HAN } }); 723 CHECK_RUNS({ { "\xE0\xA5\x91\xD9\x8B萬國碼", USCRIPT_HAN } });
724 } 724 }
725 725
726 TEST_F(ScriptRunIteratorTest, OddLatinString) 726 TEST_F(ScriptRunIteratorTest, OddLatinString)
727 { 727 {
728 CHECK_RUNS({ { "ç̈", USCRIPT_LATIN } }); 728 CHECK_RUNS({ { "ç̈", USCRIPT_LATIN } });
729 } 729 }
730 730
731 TEST_F(ScriptRunIteratorTest, CommonMalayalam)
732 {
733 CHECK_RUNS({ { "100-ാം", USCRIPT_MALAYALAM } });
734 }
735
736
731 class ScriptRunIteratorICUDataTest : public testing::Test { 737 class ScriptRunIteratorICUDataTest : public testing::Test {
738
732 public: 739 public:
733 ScriptRunIteratorICUDataTest() 740 ScriptRunIteratorICUDataTest()
734 : m_maxExtensions(0) 741 : m_maxExtensions(0)
735 , m_maxExtensionsCodepoint(0xffff) 742 , m_maxExtensionsCodepoint(0xffff)
736 { 743 {
737 int maxExtensions = 0; 744 int maxExtensions = 0;
738 UChar32 m_maxExtensionscp = 0; 745 UChar32 m_maxExtensionscp = 0;
739 for (UChar32 cp = 0; cp < 0x11000; ++cp) { 746 for (UChar32 cp = 0; cp < 0x11000; ++cp) {
740 UErrorCode status = U_ZERO_ERROR; 747 UErrorCode status = U_ZERO_ERROR;
741 int count = uscript_getScriptExtensions(cp, 0, 0, &status); 748 int count = uscript_getScriptExtensions(cp, 0, 0, &status);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } 806 }
800 } 807 }
801 } 808 }
802 809
803 // ZWJ is \u200D Cf (Format, other) and its script is inherited. I'm going to 810 // ZWJ is \u200D Cf (Format, other) and its script is inherited. I'm going to
804 // ignore this for now, as I think it shouldn't matter which run it ends up 811 // ignore this for now, as I think it shouldn't matter which run it ends up
805 // in. HarfBuzz needs to be able to use it as context and shape each 812 // in. HarfBuzz needs to be able to use it as context and shape each
806 // neighboring character appropriately no matter what run it got assigned to. 813 // neighboring character appropriately no matter what run it got assigned to.
807 814
808 } // namespace blink 815 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698