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

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

Issue 668753002: [Telemetry] Migrate bitmap.py from bitmaptools.cc to numpy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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/cloud_storage_test_base.py ('k') | content/test/gpu/gpu_tests/maps.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/gpu_rasterization.py
diff --git a/content/test/gpu/gpu_tests/gpu_rasterization.py b/content/test/gpu/gpu_tests/gpu_rasterization.py
index 1a124075fe3c869ae34d7a35ab5d08722ea2ae04..39146cfe83903f04587c73e6b95ebe76aa90a7ca 100644
--- a/content/test/gpu/gpu_tests/gpu_rasterization.py
+++ b/content/test/gpu/gpu_tests/gpu_rasterization.py
@@ -6,6 +6,8 @@ import cloud_storage_test_base
import optparse
import page_sets
+from telemetry.image_processing import image_util
+
test_harness_script = r"""
var domAutomationController = {};
@@ -45,15 +47,14 @@ class _GpuRasterizationValidator(cloud_storage_test_base.ValidatorBase):
raise page_test.Failure('Browser does not support screenshot capture')
screenshot = tab.Screenshot()
- if not screenshot:
+ if screenshot is None:
raise page_test.Failure('Could not capture screenshot')
device_pixel_ratio = tab.EvaluateJavaScript('window.devicePixelRatio')
if hasattr(page, 'test_rect'):
test_rect = [int(x * device_pixel_ratio) for x in page.test_rect]
- screenshot = screenshot.Crop(
- test_rect[0], test_rect[1],
- test_rect[2], test_rect[3])
+ screenshot = image_util.Crop(screenshot, test_rect[0], test_rect[1],
+ test_rect[2], test_rect[3])
self._ValidateScreenshotSamples(
page.display_name,
« no previous file with comments | « content/test/gpu/gpu_tests/cloud_storage_test_base.py ('k') | content/test/gpu/gpu_tests/maps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698