summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authormymax@amazon.com <mymax@amazon.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-13 15:03:52 +0000
committermymax@amazon.com <mymax@amazon.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-13 15:03:52 +0000
commit6a4eea9455e0946c76896ac5afbf91edfb86bb75 (patch)
tree7043b5f4403b0aa9bf5279f5249efd48a1877a88 /cc
parent03457599096c2eebf920c25f4555d930f805767d (diff)
downloadchromium_src-6a4eea9455e0946c76896ac5afbf91edfb86bb75.zip
chromium_src-6a4eea9455e0946c76896ac5afbf91edfb86bb75.tar.gz
chromium_src-6a4eea9455e0946c76896ac5afbf91edfb86bb75.tar.bz2
Making LayerTreeHostFiltersPixelTest slightly more strict
BUG=238755 Review URL: https://chromiumcodereview.appspot.com/18786009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/trees/layer_tree_host_pixeltest_filters.cc52
1 files changed, 38 insertions, 14 deletions
diff --git a/cc/trees/layer_tree_host_pixeltest_filters.cc b/cc/trees/layer_tree_host_pixeltest_filters.cc
index 1e2bb30..f9125b9 100644
--- a/cc/trees/layer_tree_host_pixeltest_filters.cc
+++ b/cc/trees/layer_tree_host_pixeltest_filters.cc
@@ -11,15 +11,7 @@
namespace cc {
namespace {
-class LayerTreeHostFiltersPixelTest : public LayerTreePixelTest {
- virtual void BeginTest() OVERRIDE;
-};
-
-void LayerTreeHostFiltersPixelTest::BeginTest() {
- LayerTreePixelTest::BeginTest();
- pixel_comparator_.reset(
- new FuzzyPixelComparator(true, 100.f, 0.f, 1.f, 2, 0));
-}
+class LayerTreeHostFiltersPixelTest : public LayerTreePixelTest {};
TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlur) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
@@ -38,6 +30,22 @@ TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlur) {
filters.Append(FilterOperation::CreateBlurFilter(2.f));
blur->SetBackgroundFilters(filters);
+#if defined(OS_WIN)
+ // Windows has 436 pixels off by 1: crbug.com/259915
+ float percentage_pixels_large_error = 1.09f; // 436px / (200*200)
+ float percentage_pixels_small_error = 0.0f;
+ float average_error_allowed_in_bad_pixels = 1.f;
+ int large_error_allowed = 1;
+ int small_error_allowed = 0;
+ pixel_comparator_.reset(new FuzzyPixelComparator(
+ true, // discard_alpha
+ percentage_pixels_large_error,
+ percentage_pixels_small_error,
+ average_error_allowed_in_bad_pixels,
+ large_error_allowed,
+ small_error_allowed));
+#endif
+
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL("background_filter_blur.png")));
@@ -63,6 +71,22 @@ TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlurOutsets) {
filters.Append(FilterOperation::CreateBlurFilter(5.f));
blur->SetBackgroundFilters(filters);
+#if defined(OS_WIN)
+ // Windows has 2250 pixels off by at most 2: crbug.com/259922
+ float percentage_pixels_large_error = 5.625f; // 2250px / (200*200)
+ float percentage_pixels_small_error = 0.0f;
+ float average_error_allowed_in_bad_pixels = 1.f;
+ int large_error_allowed = 2;
+ int small_error_allowed = 0;
+ pixel_comparator_.reset(new FuzzyPixelComparator(
+ true, // discard_alpha
+ percentage_pixels_large_error,
+ percentage_pixels_small_error,
+ average_error_allowed_in_bad_pixels,
+ large_error_allowed,
+ small_error_allowed));
+#endif
+
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL(
@@ -102,12 +126,12 @@ TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlurOffAxis) {
blur->SetBackgroundFilters(filters);
#if defined(OS_WIN)
- // Windows has 5 pixels off by 1: crbug.com/225027
- float percentage_pixels_large_error = 0.0125f; // 5px / (200*200)
- float percentage_pixels_small_error = 0.0125f; // 5px / (200*200)
+ // Windows has 151 pixels off by at most 2: crbug.com/225027
+ float percentage_pixels_large_error = 0.3775f; // 151px / (200*200)
+ float percentage_pixels_small_error = 0.0f;
float average_error_allowed_in_bad_pixels = 1.f;
- int large_error_allowed = 1;
- int small_error_allowed = 1;
+ int large_error_allowed = 2;
+ int small_error_allowed = 0;
pixel_comparator_.reset(new FuzzyPixelComparator(
true, // discard_alpha
percentage_pixels_large_error,