def CreateStorySetForTest(url): story_set = story.StorySet( base_dir=_BLINK_PERF_TEST_DATA_DIR, serving_dirs=[_BLINK_PERF_TEST_DATA_DIR, _BLINK_PERF_RESOURCES_DIR]) assert url.startswith('file://'), 'Expected local URI, got %s' % url blink_page = blink_perf._BlinkPerfPage( # pylint: disable=protected-access url, story_set, base_dir=story_set.base_dir, name=url[len('file://'):]) story_set.AddStory(blink_page) return story_set
def _CreateStorySetForTestFile(self, test_file_name): story_set = story.StorySet(base_dir=self._BLINK_PERF_TEST_DATA_DIR, serving_dirs={self._BLINK_PERF_TEST_DATA_DIR, self._BLINK_PERF_RESOURCES_DIR}) # pylint: disable=protected-access page = blink_perf._BlinkPerfPage('file://' + test_file_name, story_set, base_dir=story_set.base_dir, name=test_file_name) # pylint: enable=protected-access story_set.AddStory(page) return story_set