Commit e0e40955 authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Switch GPU pixel tests to full screenshots

Switches several GPU pixel tests on Fuchsia to use the new full
screenshot capabilities in Telemetry instead of the version that only
captures the visible portion of the web contents. This fixes the tests
on Fuchsia, where the device screen is significantly smaller than
previously tested devices. This path is not used everywhere because
capturing the screenshot using fromSuface: True is less likely to catch
GPU issues.

Bug: 1115680
Change-Id: I69423b4995978c1455978b7d9bdc6e80192b6ccd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355133Reviewed-by: default avatarYuly Novikov <ynovikov@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799433}
parent a8842c4a
......@@ -88,15 +88,23 @@ class MapsIntegrationTest(
{ timeout : 10000 })''')
action_runner.WaitForJavaScriptCondition('window.testCompleted', timeout=30)
screenshot = tab.Screenshot(5)
expected = _ReadPixelExpectations('maps_pixel_expectations.json')
page = _GetMapsPageForUrl(url, expected)
# Special case some tests on Fuchsia that need to grab the entire contents
# in the screenshot instead of just the visible portion due to small screen
# sizes.
if (MapsIntegrationTest.browser.platform.GetOSName() == 'fuchsia'
and page.name in pixel_test_pages.PROBLEMATIC_FUCHSIA_TESTS):
screenshot = tab.FullScreenshot(5)
else:
screenshot = tab.Screenshot(5)
if screenshot is None:
self.fail('Could not capture screenshot')
dpr = tab.EvaluateJavaScript('window.devicePixelRatio')
print 'Maps\' devicePixelRatio is ' + str(dpr)
expected = _ReadPixelExpectations('maps_pixel_expectations.json')
page = _GetMapsPageForUrl(url, expected)
# The bottom corners of Mac screenshots have black triangles due to the
# rounded corners of Mac windows. So, crop the bottom few rows off now to
# get rid of those. The triangles appear to be 5 pixels wide and tall
......
......@@ -142,7 +142,14 @@ class PixelIntegrationTest(
# Actually run the test and capture the screenshot.
if not tab.EvaluateJavaScript('domAutomationController._succeeded'):
self.fail('page indicated test failure')
screenshot = tab.Screenshot(5)
# Special case some tests on Fuchsia that need to grab the entire contents
# in the screenshot instead of just the visible portion due to small screen
# sizes.
if (PixelIntegrationTest.browser.platform.GetOSName() == 'fuchsia'
and page.name in pixel_test_pages.PROBLEMATIC_FUCHSIA_TESTS):
screenshot = tab.FullScreenshot(5)
else:
screenshot = tab.Screenshot(5)
if screenshot is None:
self.fail('Could not capture screenshot')
dpr = tab.EvaluateJavaScript('window.devicePixelRatio')
......
......@@ -10,6 +10,16 @@ from gpu_tests import skia_gold_matching_algorithms as algo
CRASH_TYPE_GPU = 'gpu'
# These tests attempt to use test rects that are larger than the small screen
# on some Fuchsia devices, so we need to use a less-desirable screenshot capture
# method to get the entire page contents instead of just the visible portion.
PROBLEMATIC_FUCHSIA_TESTS = [
'Maps_maps',
'Pixel_BackgroundImage',
'Pixel_PrecisionRoundedCorner',
'Pixel_SolidColorBackground',
]
# Meant to be used when we know a test is going to be noisy, and we want any
# images it generates to be auto-triaged until we have enough data to calculate
# more suitable/less permissive parameters.
......
......@@ -83,9 +83,6 @@ crbug.com/1084367 [ fuchsia no-use-skia-dawn ] Pixel_Video_VP9_DXVA [ Skip ]
# Fuchsia issues
crbug.com/1115673 [ fuchsia no-use-skia-dawn ] Pixel_WebGLCopyImage [ Skip ]
crbug.com/1115673 [ fuchsia ] Pixel_CanvasLowLatencyWebGLDrawImage [ Skip ]
crbug.com/1115680 [ fuchsia use-vulkan ] Pixel_BackgroundImage [ Skip ]
crbug.com/1115680 [ fuchsia ] Pixel_PrecisionRoundedCorner [ Skip ]
crbug.com/1115680 [ fuchsia ] Pixel_SolidColorBackground [ Skip ]
crbug.com/1096746 [ fuchsia no-use-skia-dawn ] Pixel_WebGL2_BlitFramebuffer_Result_Displayed [ Skip ]
crbug.com/1096746 [ fuchsia no-use-skia-dawn ] Pixel_WebGL2_ClearBufferfv_Result_Displayed [ Skip ]
crbug.com/1096746 [ fuchsia no-use-skia-dawn ] Pixel_CanvasLowLatencyWebGLAlphaFalse [ Skip ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment