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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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/ScriptRunIterator.h" 5 #include "platform/fonts/ScriptRunIterator.h"
6 6
7 #include <string> 7 #include <string>
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 #include "wtf/Threading.h" 10 #include "wtf/Threading.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 private: 644 private:
645 int m_maxExtensions; 645 int m_maxExtensions;
646 UChar32 m_maxExtensionsCodepoint; 646 UChar32 m_maxExtensionsCodepoint;
647 }; 647 };
648 648
649 // Validate that ICU never returns more than our maximum expected number of 649 // Validate that ICU never returns more than our maximum expected number of
650 // script extensions. 650 // script extensions.
651 TEST_F(ScriptRunIteratorICUDataTest, ValidateICUMaxScriptExtensions) { 651 TEST_F(ScriptRunIteratorICUDataTest, ValidateICUMaxScriptExtensions) {
652 int maxExtensions; 652 int maxExtensions;
653 UChar32 cp = GetACharWithMaxExtensions(&maxExtensions); 653 UChar32 cp = GetACharWithMaxExtensions(&maxExtensions);
654 ASSERT_LE(maxExtensions, ScriptData::kMaxScriptCount) << "char " << std::hex 654 ASSERT_LE(maxExtensions, ScriptData::kMaxScriptCount)
655 << cp << std::dec; 655 << "char " << std::hex << cp << std::dec;
656 } 656 }
657 657
658 // Check that ICUScriptData returns all of a character's scripts. 658 // Check that ICUScriptData returns all of a character's scripts.
659 // This only checks one likely character, but doesn't check all cases. 659 // This only checks one likely character, but doesn't check all cases.
660 TEST_F(ScriptRunIteratorICUDataTest, ICUDataGetScriptsReturnsAllExtensions) { 660 TEST_F(ScriptRunIteratorICUDataTest, ICUDataGetScriptsReturnsAllExtensions) {
661 int maxExtensions; 661 int maxExtensions;
662 UChar32 cp = GetACharWithMaxExtensions(&maxExtensions); 662 UChar32 cp = GetACharWithMaxExtensions(&maxExtensions);
663 Vector<UScriptCode> extensions; 663 Vector<UScriptCode> extensions;
664 ICUScriptData::instance()->getScripts(cp, extensions); 664 ICUScriptData::instance()->getScripts(cp, extensions);
665 665
(...skipping 13 matching lines...) Expand all
679 } 679 }
680 } 680 }
681 } 681 }
682 682
683 // ZWJ is \u200D Cf (Format, other) and its script is inherited. I'm going to 683 // ZWJ is \u200D Cf (Format, other) and its script is inherited. I'm going to
684 // ignore this for now, as I think it shouldn't matter which run it ends up 684 // ignore this for now, as I think it shouldn't matter which run it ends up
685 // in. HarfBuzz needs to be able to use it as context and shape each 685 // in. HarfBuzz needs to be able to use it as context and shape each
686 // neighboring character appropriately no matter what run it got assigned to. 686 // neighboring character appropriately no matter what run it got assigned to.
687 687
688 } // namespace blink 688 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698