OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 import os | 5 import os |
6 | 6 |
7 from telemetry.core import util | 7 from telemetry.core import util |
8 from telemetry.page import page_set | 8 from telemetry.page import page_set |
9 from telemetry.page import profile_creator | 9 from telemetry.page import profile_creator |
10 | 10 |
11 class SmallProfileCreator(profile_creator.ProfileCreator): | 11 class SmallProfileCreator(profile_creator.ProfileCreator): |
12 """ | 12 """ |
13 Runs a browser through a series of operations to fill in a small test profile. | 13 Runs a browser through a series of operations to fill in a small test profile. |
14 """ | 14 """ |
15 | 15 |
16 def __init__(self): | 16 def __init__(self): |
17 super(SmallProfileCreator, self).__init__() | 17 super(SmallProfileCreator, self).__init__() |
18 top_25 = os.path.join(util.GetBaseDir(), 'page_sets', 'top_25.json') | 18 top_25 = os.path.join(util.GetBaseDir(), 'page_sets', 'top_25.json') |
19 self._page_set = page_set.PageSet.FromFile(top_25) | 19 self._page_set = page_set.PageSet.FromFile(top_25) |
20 | 20 |
21 def MeasurePage(self, _, tab, results): | 21 def MeasurePage(self, _, tab, results): |
22 # Multiple tabs would help make this faster, but that can't be done until | 22 # Multiple tabs would help make this faster, but that can't be done until |
23 # crbug.com/258113 is fixed. | 23 # crbug.com/258113 is fixed. |
24 tab.WaitForDocumentReadyStateToBeComplete() | 24 |
| 25 # Can't use WaitForDocumentReadyStateToBeComplete() here due to |
| 26 # crbug.com/280750 . |
| 27 tab.WaitForDocumentReadyStateToBeInteractiveOrBetter() |
OLD | NEW |