Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 from telemetry.page import page as page_module | |
| 6 from telemetry import story | |
| 7 | |
| 8 class IndexedDBEndurePage(page_module.Page): | |
| 9 | |
| 10 def __init__(self, subtest, page_set): | |
| 11 super(IndexedDBEndurePage, self).__init__( | |
| 12 url='file://indexeddb_perf/perf_test.html', | |
| 13 page_set=page_set, | |
| 14 name='indexeddb-endure-' + subtest) | |
| 15 self._subtest = subtest | |
| 16 | |
| 17 def RunPageInteractions(self, action_runner): | |
| 18 action_runner.ExecuteJavaScript('window.testFilter = "' + | |
| 19 self._subtest + '";') | |
| 20 with action_runner.CreateInteraction('Action_Test'): | |
| 21 action_runner.ExecuteJavaScript('window.test();') | |
| 22 action_runner.WaitForJavaScriptCondition('window.done == true', 600) | |
|
cmumford
2015/08/03 17:31:34
'window.done'
dmurph
2015/08/05 15:30:32
Done.
| |
| 23 | |
| 24 class IndexedDBEndurePageSet(story.StorySet): | |
| 25 """The IndexedDB Endurance page set.""" | |
|
cmumford
2015/08/03 17:31:34
Documentation doesn't really tell me anything.
dmurph
2015/08/05 15:30:33
Done.
| |
| 26 | |
| 27 def __init__(self): | |
| 28 super(IndexedDBEndurePageSet, self).__init__() | |
| 29 self.AddStory(IndexedDBEndurePage('testCreateAndDeleteDatabases', self)) | |
|
cmumford
2015/08/03 17:31:34
Nit: Since these lines are identical what do you t
dmurph
2015/08/05 15:30:33
Nice, done.
| |
| 30 self.AddStory(IndexedDBEndurePage('testCreateAndDeleteDatabase', self)) | |
| 31 self.AddStory(IndexedDBEndurePage('testCreateKeysInStores', self)) | |
| 32 self.AddStory(IndexedDBEndurePage('testRandomReadsAndWritesWithoutIndex', | |
| 33 self)) | |
| 34 self.AddStory(IndexedDBEndurePage('testRandomReadsAndWritesWithIndex', | |
| 35 self)) | |
| 36 self.AddStory(IndexedDBEndurePage('testCursorReadsAndRandomWrites', self)) | |
| 37 self.AddStory(IndexedDBEndurePage('testReadCacheWithoutIndex', self)) | |
| 38 self.AddStory(IndexedDBEndurePage('testReadCacheWithIndex', self)) | |
| 39 self.AddStory(IndexedDBEndurePage('testCreateAndDeleteIndex', self)) | |
| 40 self.AddStory(IndexedDBEndurePage('testWalkingMultipleCursors', self)) | |
| 41 self.AddStory(IndexedDBEndurePage('testCursorSeeksWithoutIndex', self)) | |
| 42 self.AddStory(IndexedDBEndurePage('testCursorSeeksWithIndex', self)) | |
| OLD | NEW |