| 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/text/TextBreakIterator.h" | 5 #include "platform/text/TextBreakIterator.h" |
| 6 | 6 |
| 7 #include "platform/wtf/text/WTFString.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "wtf/text/WTFString.h" | |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class TextBreakIteratorTest : public testing::Test { | 12 class TextBreakIteratorTest : public testing::Test { |
| 13 protected: | 13 protected: |
| 14 void SetTestString(const char* testString) { | 14 void SetTestString(const char* testString) { |
| 15 m_testString = String::fromUTF8(testString); | 15 m_testString = String::fromUTF8(testString); |
| 16 } | 16 } |
| 17 | 17 |
| 18 // The expected break positions must be specified UTF-16 character boundaries. | 18 // The expected break positions must be specified UTF-16 character boundaries. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 TEST_F(TextBreakIteratorTest, KeepEmojiModifierSequence) { | 90 TEST_F(TextBreakIteratorTest, KeepEmojiModifierSequence) { |
| 91 SetTestString(u8"abc \u261D\U0001F3FB def"); | 91 SetTestString(u8"abc \u261D\U0001F3FB def"); |
| 92 MATCH_LINE_BREAKS(LineBreakType::Normal, {3, 7, 11}); | 92 MATCH_LINE_BREAKS(LineBreakType::Normal, {3, 7, 11}); |
| 93 MATCH_LINE_BREAKS(LineBreakType::BreakAll, {1, 2, 3, 7, 9, 10, 11}); | 93 MATCH_LINE_BREAKS(LineBreakType::BreakAll, {1, 2, 3, 7, 9, 10, 11}); |
| 94 MATCH_LINE_BREAKS(LineBreakType::KeepAll, {3, 7, 11}); | 94 MATCH_LINE_BREAKS(LineBreakType::KeepAll, {3, 7, 11}); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |