summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_unittest.cc
diff options
context:
space:
mode:
authorckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-11 13:29:42 +0000
committerckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-11 13:29:42 +0000
commit06a2742e0efecdf5e39fd4510d9d513b92beb782 (patch)
tree4f9a62ea13a199375ee653e673ee28b6edf7e5ad /ui/gfx/render_text_unittest.cc
parentb62dcb867c6576b1d730fd6b68f2f55bfda66eda (diff)
downloadchromium_src-06a2742e0efecdf5e39fd4510d9d513b92beb782.zip
chromium_src-06a2742e0efecdf5e39fd4510d9d513b92beb782.tar.gz
chromium_src-06a2742e0efecdf5e39fd4510d9d513b92beb782.tar.bz2
RenderTextHarfBuzz: Decide run direction by BiDi embedding level
BUG=382178 NOTRY=true R=msw Review URL: https://codereview.chromium.org/326123003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_unittest.cc')
-rw-r--r--ui/gfx/render_text_unittest.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc
index 6859a50..8cef145 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -1977,4 +1977,16 @@ TEST_F(RenderTextTest, HarfBuzz_CharToGlyph) {
}
+TEST_F(RenderTextTest, HarfBuzz_RunDirection) {
+ RenderTextHarfBuzz render_text;
+ const base::string16 mixed =
+ WideToUTF16(L"\x05D0\x05D1" L"1234" L"\x05D2\x05D3");
+ render_text.SetText(mixed);
+ render_text.EnsureLayout();
+ ASSERT_EQ(3U, render_text.runs_.size());
+ EXPECT_TRUE(render_text.runs_[0]->is_rtl);
+ EXPECT_FALSE(render_text.runs_[1]->is_rtl);
+ EXPECT_TRUE(render_text.runs_[2]->is_rtl);
+}
+
} // namespace gfx