1 # Copyright 2014 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 # pylint: disable=W0401,W0614 5 from telemetry.page.actions.all_page_actions import * 6 from telemetry.page import page as page_module 7 from telemetry.page import page_set as page_set_module 8 9 10 class ToughMemoryMultiTabPage(page_module.Page): 11 12 def __init__(self, url, page_set): 13 super(ToughMemoryMultiTabPage, self).__init__(url=url, page_set=page_set) 14 self.credentials_path = 'data/credentials.json' 15 self.user_agent_type = 'mobile' 16 self.archive_data_file = 'data/key_mobile_sites.json' 17 18 19 class ToughMemoryMultiTabPageSet(page_set_module.PageSet): 20 21 """ Mobile sites for exercising multi-tab memory issues """ 22 23 def __init__(self): 24 super(ToughMemoryMultiTabPageSet, self).__init__( 25 credentials_path='data/credentials.json', 26 user_agent_type='mobile', 27 archive_data_file='data/key_mobile_sites.json') 28 29 urls_list = [ 30 'https://www.google.com/#hl=en&q=barack+obama', 31 'http://theverge.com', 32 'http://techcrunch.com' 33 ] 34 35 for url in urls_list: 36 self.AddPage(ToughMemoryMultiTabPage(url, self)) 37