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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 993153003: Prevent infinite loop about itemizing text in RenderTextHarfBuzz. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 fa544f3e1bbf8b4785b9545a59c41f236dbd9b1e..caccf009ae284d2f16ef79d3995f65bc93b2c16f 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -2577,6 +2577,15 @@ TEST_F(RenderTextTest, HarfBuzz_EmptyRun) {
EXPECT_EQ(Range(0, 0), glyphs);
}
+TEST_F(RenderTextTest, HarfBuzz_InfiniteLoop) {
Daniel Erat 2015/03/17 23:26:00 nit: mind adding a comment pointing back at the bu
Jun Mukai 2015/03/18 01:32:05 added
+ RenderTextHarfBuzz render_text;
+ render_text.SetObscured(true);
+ render_text.SetText(UTF8ToUTF16("\xF0\x9F\x98\x81y"));
+ render_text.ApplyStyle(BOLD, true, Range(1, 3));
+ gfx::Canvas canvas;
+ render_text.Draw(&canvas);
+}
+
// Ensure a string fits in a display rect with a width equal to the string's.
TEST_F(RenderTextTest, StringFitsOwnWidth) {
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
« 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