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

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

Issue 303113004: gpu testing: Handle non-integral device pixel ratio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | content/test/gpu/gpu_tests/gpu_rasterization.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/cloud_storage_test_base.py
diff --git a/content/test/gpu/gpu_tests/cloud_storage_test_base.py b/content/test/gpu/gpu_tests/cloud_storage_test_base.py
index f6e5234e6d5614392d5b0fba15a9452dd47feb8b..98969301bd8cb6fed7cc40654bf71fdd84f74b7d 100644
--- a/content/test/gpu/gpu_tests/cloud_storage_test_base.py
+++ b/content/test/gpu/gpu_tests/cloud_storage_test_base.py
@@ -24,8 +24,8 @@ error_image_cloud_storage_bucket = 'chromium-browser-gpu-tests'
def _CompareScreenshotSamples(screenshot, expectations, device_pixel_ratio):
for expectation in expectations:
location = expectation["location"]
- x = location[0] * device_pixel_ratio
- y = location[1] * device_pixel_ratio
+ x = int(location[0] * device_pixel_ratio)
+ y = int(location[1] * device_pixel_ratio)
if x < 0 or y < 0 or x > screenshot.width or y > screenshot.height:
raise page_test.Failure(
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_rasterization.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698