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

Unified Diff: tools/gpu/gpu_tools/first_paint_time_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/file_server.py ('k') | tools/gpu/gpu_tools/first_paint_time_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/first_paint_time_benchmark.py
diff --git a/tools/gpu/gpu_tools/first_paint_time_benchmark.py b/tools/gpu/gpu_tools/first_paint_time_benchmark.py
index d7a34b6ddd9b3ba4d035250e4bf47fae9ba57e89..73e3063bff8160a0e0d909ac588f4eb943ef525e 100644
--- a/tools/gpu/gpu_tools/first_paint_time_benchmark.py
+++ b/tools/gpu/gpu_tools/first_paint_time_benchmark.py
@@ -12,6 +12,9 @@ import util
class FirstPaintTimeBenchmark(multi_page_benchmark.MultiPageBenchmark):
def MeasurePage(self, page, tab):
+ if tab.browser.is_content_shell:
+ return {"first_paint_secs": "unsupported"}
+
tab.runtime.Execute("""
window.__rafFired = false;
window.webkitRequestAnimationFrame(function() {
@@ -22,7 +25,8 @@ class FirstPaintTimeBenchmark(multi_page_benchmark.MultiPageBenchmark):
lambda: tab.runtime.Evaluate('window.__rafFired'), 60)
first_paint_secs = tab.runtime.Evaluate(
- 'chrome.loadTimes().firstPaintTime - chrome.loadTimes().startLoadTime')
+ 'window.chrome.loadTimes().firstPaintTime - ' +
+ 'window.chrome.loadTimes().startLoadTime')
return {
"first_paint_secs": util.RoundTo3DecimalPlaces(first_paint_secs)
« no previous file with comments | « tools/gpu/gpu_tools/file_server.py ('k') | tools/gpu/gpu_tools/first_paint_time_benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698