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
3 # found in the LICENSE file.
5 from telemetry
.page
import page
as page_module
6 from telemetry
import story
8 class IndexedDBEndurePage(page_module
.Page
):
10 def __init__(self
, subtest
, page_set
):
11 super(IndexedDBEndurePage
, self
).__init
__(
12 url
='file://indexeddb_perf/perf_test.html',
14 name
='indexeddb-endure-' + subtest
)
15 self
._subtest
= subtest
17 def RunPageInteractions(self
, action_runner
):
18 action_runner
.ExecuteJavaScript('window.testFilter = "' +
20 with action_runner
.CreateInteraction('Action_Test'):
21 action_runner
.ExecuteJavaScript('window.test();')
22 action_runner
.WaitForJavaScriptCondition('window.done', 600)
24 class IndexedDBEndurePageSet(story
.StorySet
):
25 """The IndexedDB Endurance page set.
27 This page set exercises various common operations in IndexedDB.
31 super(IndexedDBEndurePageSet
, self
).__init
__()
33 'testCreateAndDeleteDatabases',
34 'testCreateAndDeleteDatabase',
35 'testCreateKeysInStores',
36 'testRandomReadsAndWritesWithoutIndex',
37 'testRandomReadsAndWritesWithIndex',
38 'testReadCacheWithoutIndex',
39 'testReadCacheWithIndex',
40 'testCreateAndDeleteIndex',
41 'testWalkingMultipleCursors',
42 'testCursorSeeksWithoutIndex',
43 'testCursorSeeksWithIndex'
46 self
.AddStory(IndexedDBEndurePage(test
, self
))