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

Unified Diff: tools/gpu/gpu_tools/scrolling_benchmark.py

Issue 10916227: More polish in prep for CrOS support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 3 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 | « tools/gpu/gpu_tools/scroll.js ('k') | tools/gpu/gpu_tools/scrolling_benchmark_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/gpu_tools/scrolling_benchmark.py
diff --git a/tools/gpu/gpu_tools/scrolling_benchmark.py b/tools/gpu/gpu_tools/scrolling_benchmark.py
index b41951c36243510bb73b1cb743a6730045de13ac..bd865d35e6942ed51e8d8720d39ff93f85e07679 100644
--- a/tools/gpu/gpu_tools/scrolling_benchmark.py
+++ b/tools/gpu/gpu_tools/scrolling_benchmark.py
@@ -29,6 +29,10 @@ def _CalcScrollResults(rendering_stats):
}
class ScrollingBenchmark(multi_page_benchmark.MultiPageBenchmark):
+ def __init__(self):
+ super(ScrollingBenchmark, self).__init__()
+ self.use_gpu_bencharking_extension = True
+
def ScrollPageFully(self, tab):
scroll_js_path = os.path.join(os.path.dirname(__file__), 'scroll.js')
scroll_js = open(scroll_js_path, 'r').read()
@@ -48,12 +52,13 @@ class ScrollingBenchmark(multi_page_benchmark.MultiPageBenchmark):
rendering_stats = tab.runtime.Evaluate('window.__scrollTestResult')
- if rendering_stats["numFramesSentToScreen"] == 0:
- raise scrolling_benchmark.DidNotScrollException()
+ if not (rendering_stats["numFramesSentToScreen"] > 0):
+ raise DidNotScrollException()
return rendering_stats
def CustomizeBrowserOptions(self, options):
- options.extra_browser_args.append('--enable-gpu-benchmarking')
+ if self.use_gpu_bencharking_extension:
+ options.extra_browser_args.append('--enable-gpu-benchmarking')
def MeasurePage(self, page, tab):
rendering_stats = self.ScrollPageFully(tab)
« no previous file with comments | « tools/gpu/gpu_tools/scroll.js ('k') | tools/gpu/gpu_tools/scrolling_benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698