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

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

Issue 1413883003: Add a presubmit script and pylintrc for content/test/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address kbr's comments Created 5 years, 2 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
Index: content/test/gpu/gpu_tests/screenshot_sync.py
diff --git a/content/test/gpu/gpu_tests/screenshot_sync.py b/content/test/gpu/gpu_tests/screenshot_sync.py
index b3881c0ee8db876321b2c22f376bea370b780afb..c62865cbc80bb31db1e94dcbc5d351864af4256c 100644
--- a/content/test/gpu/gpu_tests/screenshot_sync.py
+++ b/content/test/gpu/gpu_tests/screenshot_sync.py
@@ -4,9 +4,9 @@
import os
import random
-import gpu_test_base
-import path_util
-import screenshot_sync_expectations as expectations
+from gpu_tests import gpu_test_base
+from gpu_tests import path_util
+from gpu_tests import screenshot_sync_expectations
from telemetry import benchmark
from telemetry.page import page_test
@@ -34,15 +34,15 @@ class ScreenshotSyncValidator(gpu_test_base.ValidatorBase):
(i, canvasRGB[i], screenshotRGB[i]))
def CheckScreenshot():
- canvasRGB = [];
- for i in range(0, 3):
+ canvasRGB = []
+ for _ in range(0, 3):
canvasRGB.append(random.randint(0, 255))
tab.EvaluateJavaScript("window.draw(%d, %d, %d);" % tuple(canvasRGB))
screenshot = tab.Screenshot(5)
CheckColorMatch(canvasRGB, image_util.Pixels(screenshot))
repetitions = 50
- for n in range(0, repetitions):
+ for _ in range(0, repetitions):
CheckScreenshot()
class ScreenshotSyncPage(gpu_test_base.PageBase):
@@ -66,7 +66,7 @@ class ScreenshotSyncProcess(gpu_test_base.TestBase):
return 'screenshot_sync'
def _CreateExpectations(self):
- return expectations.ScreenshotSyncExpectations()
+ return screenshot_sync_expectations.ScreenshotSyncExpectations()
def CreateStorySet(self, options):
ps = story_set_module.StorySet(base_dir=data_path, serving_dirs=[''])
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_expectations.py ('k') | content/test/gpu/gpu_tests/screenshot_sync_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698