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 3# found in the LICENSE file. 4 5import os 6 7from telemetry.core import profile_creator 8from telemetry.page import page_set 9 10class SmallProfileCreator(profile_creator.ProfileCreator): 11 """ 12 Runs a browser through a series of operations to fill in a small test profile. 13 """ 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() 24