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

Side by Side Diff: tools/perf/page_sets/dummy_story_set.py

Issue 2933173002: Deleting unused story sets (Closed)
Patch Set: Deleting unused story sets Created 3 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 from telemetry.page import page as page_module 4 from telemetry.page import page as page_module
5 from telemetry import story 5 from telemetry import story
6 6
7 7
8 class DummyPage(page_module.Page): 8 class DummyPage(page_module.Page):
9 9
10 def __init__(self, page_set): 10 def __init__(self, page_set):
11 super(DummyPage, self).__init__( 11 super(DummyPage, self).__init__(
12 url='file://dummy_pages/dummy_page.html', 12 url='file://dummy_pages/dummy_page.html',
13 name='dummy_page.html', 13 name='dummy_page.html',
14 page_set=page_set) 14 page_set=page_set)
15 15
16 def RunPageInteractions(self, action_runner): 16 def RunPageInteractions(self, action_runner):
17 assert action_runner.EvaluateJavaScript('1 + window.__dummy_value') == 2 17 assert action_runner.EvaluateJavaScript('1 + window.__dummy_value') == 2
18 18
19 19
20 class BrokenDummyPage(page_module.Page):
21
22 def __init__(self, page_set):
23 super(BrokenDummyPage, self).__init__(
24 url='file://dummy_pages/dummy_page.html',
25 name='Broken dummy page',
26 page_set=page_set)
27
28 def RunPageInteractions(self, action_runner):
29 # The call below should raise an AssertionError
30 assert action_runner.EvaluateJavaScript('1 + window.__dummy_value') == 3
31
32
33 class DummyStorySet(story.StorySet): 20 class DummyStorySet(story.StorySet):
34 21
35 def __init__(self): 22 def __init__(self):
36 super(DummyStorySet, self).__init__(verify_names=True) 23 super(DummyStorySet, self).__init__(verify_names=True)
37 self.AddStory(DummyPage(self)) 24 self.AddStory(DummyPage(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/diagonal_scrolling_supported_shared_state.py ('k') | tools/perf/page_sets/google_pages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698