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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 326123003: RenderTextHarfBuzz: Decide run direction by BiDi embedding level (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/render_text_harfbuzz.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_unittest.cc
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc
index 6859a50cf79c85a965bcc7c040672f9b6316b36e..ba1c4abdddba00edd3f6176fbd529004c5b844f3 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) {
msw 2014/06/10 20:47:56 Does this fail without the functional changes of t
ckocagil 2014/06/11 07:18:08 Yes, I tried this by locally reverting the functio
+ 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_EQ(true, render_text.runs_[0]->is_rtl);
+ EXPECT_EQ(false, render_text.runs_[1]->is_rtl);
+ EXPECT_EQ(true, render_text.runs_[2]->is_rtl);
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/render_text_harfbuzz.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698