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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 785763002: Disable subpixel positioning if DirectWrite isn't initialized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 6 years 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
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];
}
}

Powered by Google App Engine
This is Rietveld 408576698