Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # 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?
| |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import os | |
| 6 | |
| 7 from telemetry.page import page_set | |
| 8 | |
| 9 # Runs a browser through a series of operations to fill in a small test profile. | |
| 10 class SmallProfile(object): | |
| 11 def __init__(self, browser): | |
| 12 super(SmallProfile, self).__init__() | |
| 13 self._browser = browser | |
| 14 | |
| 15 def CreateProfile(self): | |
| 16 top_25 = os.path.join(os.path.dirname(__file__), | |
| 17 '..', 'page_sets', 'top_25.json') | |
| 18 pages_to_load = page_set.PageSet.FromFile(top_25) | |
| 19 tab = self._browser.tabs[0] | |
| 20 for page in pages_to_load: | |
| 21 tab.Navigate(page.url) | |
| 22 tab.WaitForDocumentReadyStateToBeComplete() | |
| 23 tab.Disconnect() | |
| OLD | NEW |