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 import shutil | |
6 | |
7 from profile_creators import profile_generator | |
8 from profile_creators import extension_profile_extender | |
9 from telemetry.page import shared_page_state | |
10 | |
11 | |
12 class ExtensionProfileSharedState(shared_page_state.SharedPageState): | |
13 def __init__(self, test, finder_options, story_set): | |
robliao
2015/07/16 18:33:24
Add a docstring to this class. (See section under
sydli
2015/07/16 20:01:29
Done.
| |
14 super(ExtensionProfileSharedState, self).__init__( | |
15 test, finder_options, story_set) | |
16 generator = profile_generator.ProfileGenerator( | |
17 extension_profile_extender.ExtensionProfileExtender, | |
18 "extension_profile") | |
robliao
2015/07/16 18:33:24
Consistency: This delta appears to be preferring s
sydli
2015/07/16 20:01:29
Done.
| |
19 self._out_dir = generator.Run(finder_options) | |
20 if self._out_dir: | |
21 finder_options.browser_options.profile_dir = self._out_dir | |
22 else: | |
23 finder_options.browser_options.dont_override_profile = True | |
24 | |
25 def TearDownState(self): | |
26 """ Clean up generated profile directory. """ | |
robliao
2015/07/16 18:33:23
Remove padding spaces in docstring.
sydli
2015/07/16 20:01:29
Done.
| |
27 super(ExtensionProfileSharedState, self).TearDownState() | |
28 if self._out_dir: | |
29 shutil.rmtree(self._out_dir) | |
OLD | NEW |