| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 | 4 |
| 5 """Runs a Google Maps performance test. | 5 """Runs a Google Maps performance test. |
| 6 Rerforms several common navigation actions on the map (pan, zoom, rotate)""" | 6 Rerforms several common navigation actions on the map (pan, zoom, rotate)""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 results.Add('render_mean_time', 'ms', render) | 28 results.Add('render_mean_time', 'ms', render) |
| 29 | 29 |
| 30 class MapsPage(page_module.Page): | 30 class MapsPage(page_module.Page): |
| 31 def __init__(self, page_set, base_dir): | 31 def __init__(self, page_set, base_dir): |
| 32 super(MapsPage, self).__init__( | 32 super(MapsPage, self).__init__( |
| 33 url='http://localhost:10020/tracker.html', | 33 url='http://localhost:10020/tracker.html', |
| 34 page_set=page_set, | 34 page_set=page_set, |
| 35 base_dir=base_dir) | 35 base_dir=base_dir) |
| 36 | 36 |
| 37 def RunNavigateSteps(self, action_runner): | 37 def RunNavigateSteps(self, action_runner): |
| 38 action_runner.Run(NavigateAction()) | 38 action_runner.NavigateToPage(self) |
| 39 action_runner.Run(WaitAction({'javascript': 'window.testDone'})) | 39 action_runner.RunAction(WaitAction({'javascript': 'window.testDone'})) |
| 40 | 40 |
| 41 | 41 |
| 42 @test.Disabled | 42 @test.Disabled |
| 43 class MapsBenchmark(test.Test): | 43 class MapsBenchmark(test.Test): |
| 44 """Basic Google Maps benchmarks.""" | 44 """Basic Google Maps benchmarks.""" |
| 45 test = _MapsMeasurement | 45 test = _MapsMeasurement |
| 46 | 46 |
| 47 def CreatePageSet(self, options): | 47 def CreatePageSet(self, options): |
| 48 page_set_path = os.path.join( | 48 page_set_path = os.path.join( |
| 49 util.GetChromiumSrcDir(), 'tools', 'perf', 'page_sets') | 49 util.GetChromiumSrcDir(), 'tools', 'perf', 'page_sets') |
| 50 ps = page_set_module.PageSet( | 50 ps = page_set_module.PageSet( |
| 51 archive_data_file='data/maps.json', | 51 archive_data_file='data/maps.json', |
| 52 make_javascript_deterministic=False, | 52 make_javascript_deterministic=False, |
| 53 file_path=page_set_path) | 53 file_path=page_set_path) |
| 54 ps.AddPage(MapsPage(ps, ps.base_dir)) | 54 ps.AddPage(MapsPage(ps, ps.base_dir)) |
| 55 return ps | 55 return ps |
| 56 | 56 |
| 57 class MapsNoVsync(MapsBenchmark): | 57 class MapsNoVsync(MapsBenchmark): |
| 58 """Runs the Google Maps benchmark with Vsync disabled""" | 58 """Runs the Google Maps benchmark with Vsync disabled""" |
| 59 tag = 'novsync' | 59 tag = 'novsync' |
| 60 | 60 |
| 61 def CustomizeBrowserOptions(self, options): | 61 def CustomizeBrowserOptions(self, options): |
| 62 options.AppendExtraBrowserArgs('--disable-gpu-vsync') | 62 options.AppendExtraBrowserArgs('--disable-gpu-vsync') |
| OLD | NEW |