OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 telemetry.page import cache_temperature as cache_temperature_module |
4 from telemetry.page import page | 5 from telemetry.page import page |
5 from telemetry import story | 6 from telemetry import story |
6 | 7 |
7 class OopifBasicPageSet(story.StorySet): | 8 class OopifBasicPageSet(story.StorySet): |
8 """ Basic set of pages used to measure performance of out-of-process | 9 """ Basic set of pages used to measure performance of out-of-process |
9 iframes. | 10 iframes. |
10 """ | 11 """ |
11 | 12 |
12 def __init__(self): | 13 def __init__(self, cache_temperatures=None): |
13 super(OopifBasicPageSet, self).__init__( | 14 super(OopifBasicPageSet, self).__init__( |
14 archive_data_file='data/oopif_basic.json', | 15 archive_data_file='data/oopif_basic.json', |
15 cloud_storage_bucket=story.PARTNER_BUCKET) | 16 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 17 if cache_temperatures is None: |
| 18 cache_temperatures = [cache_temperature_module.ANY] |
16 | 19 |
17 urls = [ | 20 urls = [ |
18 'http://www.cnn.com', | 21 'http://www.cnn.com', |
19 'http://www.ebay.com', | 22 'http://www.ebay.com', |
20 'http://booking.com', | 23 'http://booking.com', |
21 # Disabled because it causes flaky runs https://crbug.com/522870 | 24 # Disabled because it causes flaky runs https://crbug.com/522870 |
22 #'http://www.rei.com/', | 25 #'http://www.rei.com/', |
23 'http://www.fifa.com/', | 26 'http://www.fifa.com/', |
24 # Disabled because it is flaky on Windows and Android | 27 # Disabled because it is flaky on Windows and Android |
25 #'http://arstechnica.com/', | 28 #'http://arstechnica.com/', |
26 'http://www.nationalgeographic.com/', | 29 'http://www.nationalgeographic.com/', |
27 # Cross-site heavy! Enable them once they render without crashing. | 30 # Cross-site heavy! Enable them once they render without crashing. |
28 #'http://www.nba.com/', | 31 #'http://www.nba.com/', |
29 #'http://www.phonearena.com/', | 32 #'http://www.phonearena.com/', |
30 #'http://slickdeals.net/', | 33 #'http://slickdeals.net/', |
31 #'http://www.163.com/', | 34 #'http://www.163.com/', |
32 ] | 35 ] |
33 | 36 |
34 for url in urls: | 37 for url in urls: |
35 self.AddStory(page.Page(url, self)) | 38 for temp in cache_temperatures: |
| 39 self.AddStory(page.Page(url, self, cache_temperature=temp)) |
OLD | NEW |