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

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

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 years, 9 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 4
5 from telemetry.page import page as page_module 5 from telemetry.page import page as page_module
6 from telemetry import story 6 from telemetry import story
7 7
8 class IndexedDBEndurePage(page_module.Page): 8 class IndexedDBEndurePage(page_module.Page):
9 9
10 def __init__(self, subtest, page_set): 10 def __init__(self, subtest, page_set):
11 super(IndexedDBEndurePage, self).__init__( 11 super(IndexedDBEndurePage, self).__init__(
12 url='file://indexeddb_perf/perf_test.html', 12 url='file://indexeddb_perf/perf_test.html',
13 page_set=page_set, 13 page_set=page_set,
14 name='indexeddb-endure-' + subtest) 14 name='indexeddb-endure-' + subtest)
15 self._subtest = subtest 15 self._subtest = subtest
16 16
17 def RunPageInteractions(self, action_runner): 17 def RunPageInteractions(self, action_runner):
18 action_runner.ExecuteJavaScript2( 18 action_runner.ExecuteJavaScript(
19 'window.testFilter = {{ subtest }};', subtest=self._subtest) 19 'window.testFilter = {{ subtest }};', subtest=self._subtest)
20 with action_runner.CreateInteraction('Action_Test'): 20 with action_runner.CreateInteraction('Action_Test'):
21 action_runner.ExecuteJavaScript2('window.test();') 21 action_runner.ExecuteJavaScript('window.test();')
22 action_runner.WaitForJavaScriptCondition2( 22 action_runner.WaitForJavaScriptCondition(
23 'window.done', timeout=600) 23 'window.done', timeout=600)
24 24
25 class IndexedDBEndurePageSet(story.StorySet): 25 class IndexedDBEndurePageSet(story.StorySet):
26 """The IndexedDB Endurance page set. 26 """The IndexedDB Endurance page set.
27 27
28 This page set exercises various common operations in IndexedDB. 28 This page set exercises various common operations in IndexedDB.
29 """ 29 """
30 30
31 def __init__(self): 31 def __init__(self):
32 super(IndexedDBEndurePageSet, self).__init__() 32 super(IndexedDBEndurePageSet, self).__init__()
33 tests = [ 33 tests = [
34 'testCreateAndDeleteDatabases', 34 'testCreateAndDeleteDatabases',
35 'testCreateAndDeleteDatabase', 35 'testCreateAndDeleteDatabase',
36 'testCreateKeysInStores', 36 'testCreateKeysInStores',
37 'testRandomReadsAndWritesWithoutIndex', 37 'testRandomReadsAndWritesWithoutIndex',
38 'testRandomReadsAndWritesWithIndex', 38 'testRandomReadsAndWritesWithIndex',
39 'testReadCacheWithoutIndex', 39 'testReadCacheWithoutIndex',
40 'testReadCacheWithIndex', 40 'testReadCacheWithIndex',
41 'testCreateAndDeleteIndex', 41 'testCreateAndDeleteIndex',
42 'testWalkingMultipleCursors', 42 'testWalkingMultipleCursors',
43 'testCursorSeeksWithoutIndex', 43 'testCursorSeeksWithoutIndex',
44 'testCursorSeeksWithIndex' 44 'testCursorSeeksWithIndex'
45 ] 45 ]
46 for test in tests: 46 for test in tests:
47 self.AddStory(IndexedDBEndurePage(test, self)) 47 self.AddStory(IndexedDBEndurePage(test, self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/image_decoding_measurement.py ('k') | tools/perf/page_sets/infinite_scroll_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698