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

Unified Diff: cc/output/gl_renderer_pixeltest.cc

Issue 12558003: cc: Made image comparison for pixel tests error tolerant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added output of error pixel details. Created 7 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 | « cc/cc_tests.gyp ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer_pixeltest.cc
diff --git a/cc/output/gl_renderer_pixeltest.cc b/cc/output/gl_renderer_pixeltest.cc
index b7cdbd85269aec4e745c624b2e2c9a15c212e4a5..064b78bf27a2980d47aa8ca1256a81c7ff463f41 100644
--- a/cc/output/gl_renderer_pixeltest.cc
+++ b/cc/output/gl_renderer_pixeltest.cc
@@ -95,7 +95,8 @@ TEST_F(GLRendererPixelTest, SimpleGreenRect) {
renderer_->DrawFrame(&pass_list);
EXPECT_TRUE(PixelsMatchReference(
- base::FilePath(FILE_PATH_LITERAL("green.png")), true));
+ base::FilePath(FILE_PATH_LITERAL("green.png")),
+ ExactPixelComparator(true)));
}
TEST_F(GLRendererPixelTest, fastPassColorFilterAlpha) {
@@ -190,7 +191,8 @@ TEST_F(GLRendererPixelTest, fastPassColorFilterAlpha) {
renderer_->DrawFrame(&pass_list);
EXPECT_TRUE(PixelsMatchReference(
- base::FilePath(FILE_PATH_LITERAL("blue_yellow_alpha.png")), false));
+ base::FilePath(FILE_PATH_LITERAL("blue_yellow_alpha.png")),
+ ExactPixelComparator(false)));
}
TEST_F(GLRendererPixelTest, fastPassColorFilterAlphaTranslation) {
@@ -290,7 +292,7 @@ TEST_F(GLRendererPixelTest, fastPassColorFilterAlphaTranslation) {
EXPECT_TRUE(PixelsMatchReference(
base::FilePath(FILE_PATH_LITERAL("blue_yellow_alpha_translate.png")),
- false));
+ ExactPixelComparator(false)));
}
TEST_F(GLRendererPixelTest, RenderPassChangesSize) {
@@ -344,7 +346,8 @@ TEST_F(GLRendererPixelTest, RenderPassChangesSize) {
renderer_->DrawFrame(&pass_list);
EXPECT_TRUE(PixelsMatchReference(
- base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")), true));
+ base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")),
+ ExactPixelComparator(true)));
}
class GLRendererPixelTestWithBackgroundFilter : public GLRendererPixelTest {
@@ -471,7 +474,8 @@ TEST_F(GLRendererPixelTestWithBackgroundFilter, InvertFilter) {
DrawFrame();
EXPECT_TRUE(PixelsMatchReference(
- base::FilePath(FILE_PATH_LITERAL("background_filter.png")), true));
+ base::FilePath(FILE_PATH_LITERAL("background_filter.png")),
+ ExactPixelComparator(true)));
}
TEST_F(GLRendererPixelTest, AntiAliasing) {
@@ -517,7 +521,8 @@ TEST_F(GLRendererPixelTest, AntiAliasing) {
renderer_->DrawFrame(&pass_list);
EXPECT_TRUE(PixelsMatchReference(
- base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")), true));
+ base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")),
+ ExactPixelComparator(true)));
}
#endif
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698