Index: ui/gfx/render_text_unittest.cc |
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc |
index 774fd04260f93bb709887cabef20a93e5e7be239..a1f96fd08cfa81bd9eb3edd4b4de7fcd266555cf 100644 |
--- a/ui/gfx/render_text_unittest.cc |
+++ b/ui/gfx/render_text_unittest.cc |
@@ -15,6 +15,7 @@ |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/gfx/break_list.h" |
#include "ui/gfx/canvas.h" |
+#include "ui/gfx/color_utils.h" |
#include "ui/gfx/font.h" |
#include "ui/gfx/render_text_harfbuzz.h" |
@@ -2400,7 +2401,8 @@ TEST_F(RenderTextTest, TextDoesntClip) { |
sk_canvas->peekPixels(NULL, NULL)); |
ASSERT_NE(nullptr, buffer); |
for (int y = 0; y < 50; ++y) { |
- EXPECT_EQ(SK_ColorWHITE, buffer[width + y * 300]) |
+ const SkColor color = buffer[width + y * 300]; |
+ EXPECT_LT(230U, color_utils::GetLuminanceForColor(color)) |
msw
2014/12/10 23:55:50
Add a comment explaining the lax condition here.
msw
2014/12/11 23:30:12
Should this perhaps just allow the first column pa
ckocagil
2014/12/12 09:52:11
Done.
|
<< "String: " << kTestStrings[i]; |
} |
} |