Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: tools/telemetry/unittest_data/test_page_set.py

Issue 311193003: [telemetry] Cleanups for benchmarks importing page sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove description fo' realz. (from gpu tests) Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 from telemetry.page.page_set import PageSet 5 from telemetry.page.page_set import PageSet
6 from telemetry.page.page import Page 6 from telemetry.page.page import Page
7 7
8 from unittest_data.pages.external_page import ExternalPage 8 from unittest_data.pages.external_page import ExternalPage
9 9
10 class InternalPage(Page): 10 class InternalPage(Page):
11 def __init__(self, ps): 11 def __init__(self, ps):
12 super(InternalPage, self).__init__('file://bar.html', page_set=ps) 12 super(InternalPage, self).__init__('file://bar.html', page_set=ps)
13 13
14 class TestPageSet(PageSet): 14 class TestPageSet(PageSet):
15 """A pageset for testing purpose"""
16
15 def __init__(self): 17 def __init__(self):
16 super(TestPageSet, self).__init__( 18 super(TestPageSet, self).__init__(
17 description='A pageset for testing purpose',
18 archive_data_file='data/test.json', 19 archive_data_file='data/test.json',
19 credentials_path='data/credential', 20 credentials_path='data/credential',
20 user_agent_type='desktop') 21 user_agent_type='desktop')
21 22
22 #top google property; a google tab is often open 23 #top google property; a google tab is often open
23 class Google(Page): 24 class Google(Page):
24 def __init__(self, ps): 25 def __init__(self, ps):
25 super(Google, self).__init__('https://www.google.com', page_set=ps) 26 super(Google, self).__init__('https://www.google.com', page_set=ps)
26 27
27 def RunGetActionRunner(self, action_runner): 28 def RunGetActionRunner(self, action_runner):
28 return action_runner 29 return action_runner
29 30
30 self.AddPage(Google(self)) 31 self.AddPage(Google(self))
31 self.AddPage(InternalPage(self)) 32 self.AddPage(InternalPage(self))
32 self.AddPage(ExternalPage(self)) 33 self.AddPage(ExternalPage(self))
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/unittest/page_set_smoke_test.py ('k') | tools/telemetry/unittest_data/test_simple_one_page_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698