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

Unified Diff: content/test/gpu/gpu_tests/screenshot_sync_integration_test.py

Issue 2962433002: color: Run GPU pixel tests with ColorCorrectRendering feature (Closed)
Patch Set: Update tests that fail w/new flag Created 3 years, 6 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 | « content/test/gpu/gpu_tests/pixel_test_pages.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/screenshot_sync_integration_test.py
diff --git a/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py b/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py
index 0d0c00dc7edf4cff070fe2891b90b993516a762f..7a2efe4d723f09fc32493ff8d4ab270f3ff4ace8 100644
--- a/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py
+++ b/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py
@@ -6,6 +6,7 @@ import os
import random
import sys
+from gpu_tests import color_profile_manager
from gpu_tests import gpu_integration_test
from gpu_tests import path_util
from gpu_tests import screenshot_sync_expectations
@@ -28,6 +29,7 @@ class ScreenshotSyncIntegrationTest(gpu_integration_test.GpuIntegrationTest):
@classmethod
def SetUpProcess(cls):
+ color_profile_manager.ForceUntilExitSRGB()
super(cls, ScreenshotSyncIntegrationTest).SetUpProcess()
cls.CustomizeBrowserArgs(cls._AddDefaultArgs([]))
cls.StartBrowser()
@@ -37,7 +39,10 @@ class ScreenshotSyncIntegrationTest(gpu_integration_test.GpuIntegrationTest):
def _AddDefaultArgs(browser_args):
# --test-type=gpu is used to suppress the "Google API Keys are
# missing" infobar, which causes flakiness in tests.
- return ['--test-type=gpu'] + browser_args
+ return [
+ '--force-color-profile=srgb',
+ '--enable-features=ColorCorrectRendering',
+ '--test-type=gpu'] + browser_args
@classmethod
def _CreateExpectations(cls):
@@ -68,7 +73,9 @@ class ScreenshotSyncIntegrationTest(gpu_integration_test.GpuIntegrationTest):
def _CheckColorMatchAtLocation(self, expectedRGB, screenshot, x, y):
pixel_value = image_util.GetPixelColor(screenshot, x, y)
- if not expectedRGB.IsEqual(pixel_value):
+ # Allow for off-by-one errors due to color conversion.
+ tolerance = 1
+ if not expectedRGB.IsEqual(pixel_value, tolerance):
error_message = ('Color mismatch at (%d, %d): expected (%d, %d, %d), ' +
'got (%d, %d, %d)') % (
x, y, expectedRGB.r, expectedRGB.g, expectedRGB.b,
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_test_pages.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698