| 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 pixel test. | 5 """Runs a Google Maps pixel test. |
| 6 Performs several common navigation actions on the map (pan, zoom, rotate) then | 6 Performs several common navigation actions on the map (pan, zoom, rotate) then |
| 7 captures a screenshot and compares selected pixels against expected values""" | 7 captures a screenshot and compares selected pixels against expected values""" |
| 8 | 8 |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 make_javascript_deterministic=False, | 96 make_javascript_deterministic=False, |
| 97 expectations=expectations) | 97 expectations=expectations) |
| 98 self.pixel_expectations = 'data/maps_004_expectations.json' | 98 self.pixel_expectations = 'data/maps_004_expectations.json' |
| 99 | 99 |
| 100 def RunNavigateSteps(self, action_runner): | 100 def RunNavigateSteps(self, action_runner): |
| 101 super(MapsPage, self).RunNavigateSteps(action_runner) | 101 super(MapsPage, self).RunNavigateSteps(action_runner) |
| 102 action_runner.WaitForJavaScriptCondition( | 102 action_runner.WaitForJavaScriptCondition( |
| 103 'window.testDone', timeout_in_seconds=180) | 103 'window.testDone', timeout_in_seconds=180) |
| 104 | 104 |
| 105 | 105 |
| 106 class Maps(cloud_storage_test_base.TestBase): | 106 class Maps(cloud_storage_test_base.CloudStorageTestBase): |
| 107 """Google Maps pixel tests. | 107 """Google Maps pixel tests. |
| 108 | 108 |
| 109 Note: the WPR for this test was recorded from the smoothness.maps | 109 Note: the WPR for this test was recorded from the smoothness.maps |
| 110 benchmark's similar page. The Maps team gave us a build of their | 110 benchmark's similar page. The Maps team gave us a build of their |
| 111 test. The only modification to the test was to config.js, where the | 111 test. The only modification to the test was to config.js, where the |
| 112 width and height query args were set to 800 by 600. The WPR was | 112 width and height query args were set to 800 by 600. The WPR was |
| 113 recorded with: | 113 recorded with: |
| 114 | 114 |
| 115 tools/perf/record_wpr smoothness_maps --browser=system --upload | 115 tools/perf/record_wpr smoothness_maps --browser=system --upload |
| 116 | 116 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 129 | 129 |
| 130 def CreateStorySet(self, options): | 130 def CreateStorySet(self, options): |
| 131 story_set_path = os.path.join( | 131 story_set_path = os.path.join( |
| 132 path_util.GetChromiumSrcDir(), 'content', 'test', 'gpu', 'page_sets') | 132 path_util.GetChromiumSrcDir(), 'content', 'test', 'gpu', 'page_sets') |
| 133 ps = story_set_module.StorySet( | 133 ps = story_set_module.StorySet( |
| 134 archive_data_file='data/maps.json', | 134 archive_data_file='data/maps.json', |
| 135 base_dir=story_set_path, | 135 base_dir=story_set_path, |
| 136 cloud_storage_bucket=story_module.PUBLIC_BUCKET) | 136 cloud_storage_bucket=story_module.PUBLIC_BUCKET) |
| 137 ps.AddStory(MapsPage(ps, ps.base_dir, self.GetExpectations())) | 137 ps.AddStory(MapsPage(ps, ps.base_dir, self.GetExpectations())) |
| 138 return ps | 138 return ps |
| OLD | NEW |