Chromium Code Reviews| Index: tools/perf/perf_tools/small_profile.py |
| diff --git a/tools/perf/perf_tools/small_profile.py b/tools/perf/perf_tools/small_profile.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fd0b6b30a5ce85696b36ea96ceacdfe4b36a213d |
| --- /dev/null |
| +++ b/tools/perf/perf_tools/small_profile.py |
| @@ -0,0 +1,23 @@ |
| +# Copyright (c) 2013 The Chromium Authors. All rights reserved. |
|
nduca
2013/04/26 20:09:36
why is this one here and not with the dirty one?
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import os |
| + |
| +from telemetry.page import page_set |
| + |
| +# Runs a browser through a series of operations to fill in a small test profile. |
| +class SmallProfile(object): |
| + def __init__(self, browser): |
| + super(SmallProfile, self).__init__() |
| + self._browser = browser |
| + |
| + def CreateProfile(self): |
| + top_25 = os.path.join(os.path.dirname(__file__), |
| + '..', 'page_sets', 'top_25.json') |
| + pages_to_load = page_set.PageSet.FromFile(top_25) |
| + tab = self._browser.tabs[0] |
| + for page in pages_to_load: |
| + tab.Navigate(page.url) |
| + tab.WaitForDocumentReadyStateToBeComplete() |
| + tab.Disconnect() |