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

Side by Side Diff: content/test/gpu/gpu_tests/pixel.py

Issue 452123002: Rename ValidatePage/MeasurePage -> ValidateAndMeasurePage for all files outside tools/telemetry and… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/memory.py ('k') | content/test/gpu/gpu_tests/screenshot_sync.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 from datetime import datetime 4 from datetime import datetime
5 import glob 5 import glob
6 import optparse 6 import optparse
7 import os 7 import os
8 import re 8 import re
9 9
10 import cloud_storage_test_base 10 import cloud_storage_test_base
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class PixelTestFailure(Exception): 46 class PixelTestFailure(Exception):
47 pass 47 pass
48 48
49 def _DidTestSucceed(tab): 49 def _DidTestSucceed(tab):
50 return tab.EvaluateJavaScript('domAutomationController._succeeded') 50 return tab.EvaluateJavaScript('domAutomationController._succeeded')
51 51
52 class _PixelValidator(cloud_storage_test_base.ValidatorBase): 52 class _PixelValidator(cloud_storage_test_base.ValidatorBase):
53 def CustomizeBrowserOptions(self, options): 53 def CustomizeBrowserOptions(self, options):
54 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') 54 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking')
55 55
56 def ValidatePage(self, page, tab, results): 56 def ValidateAndMeasurePage(self, page, tab, results):
57 if not _DidTestSucceed(tab): 57 if not _DidTestSucceed(tab):
58 raise page_test.Failure('Page indicated a failure') 58 raise page_test.Failure('Page indicated a failure')
59 59
60 if not tab.screenshot_supported: 60 if not tab.screenshot_supported:
61 raise page_test.Failure('Browser does not support screenshot capture') 61 raise page_test.Failure('Browser does not support screenshot capture')
62 62
63 screenshot = tab.Screenshot(5) 63 screenshot = tab.Screenshot(5)
64 64
65 if not screenshot: 65 if not screenshot:
66 raise page_test.Failure('Could not capture screenshot') 66 raise page_test.Failure('Could not capture screenshot')
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 default=default_reference_image_dir) 159 default=default_reference_image_dir)
160 160
161 def CreatePageSet(self, options): 161 def CreatePageSet(self, options):
162 page_set = super(Pixel, self).CreatePageSet(options) 162 page_set = super(Pixel, self).CreatePageSet(options)
163 for page in page_set.pages: 163 for page in page_set.pages:
164 page.script_to_evaluate_on_commit = test_harness_script 164 page.script_to_evaluate_on_commit = test_harness_script
165 return page_set 165 return page_set
166 166
167 def CreateExpectations(self, page_set): 167 def CreateExpectations(self, page_set):
168 return pixel_expectations.PixelExpectations() 168 return pixel_expectations.PixelExpectations()
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/memory.py ('k') | content/test/gpu/gpu_tests/screenshot_sync.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698