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

Side by Side Diff: chrome/test/functional/ap_lab/ap_configurator_factory.py

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 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 os
6
7 import dlink_ap_configurator
8 import linksys_ap_configurator
9
10 import pyauto_ap_configurator # must preceed pyauto
11 import pyauto
12
13
14 class APConfiguratorFactory(object):
15 """Class that instantiates all available APConfigurators."""
16
17 def __init__(self, pyauto_instance, config_dict_file_path=None):
18 if not config_dict_file_path:
19 # Load the default dictionary file
20 config_dict_file_path = os.path.join(pyauto_instance.DataDir(),
21 'pyauto_private', 'chromeos',
22 'network', 'wifi_compat_config')
23 assert os.path.exists(config_dict_file_path), ('%s missing' %
24 config_dict_file_path)
25 ap_dict = pyauto_instance.EvalDataFrom(config_dict_file_path)
26 self.ap_list = []
27 self.ap_list.append(linksys_ap_configurator.LinksysAPConfigurator(
28 pyauto_instance, ap_dict['LinksysAPConfigurator']))
29 self.ap_list.append(dlink_ap_configurator.DLinkAPConfigurator(
30 pyauto_instance, ap_dict['DLinkAPConfigurator']))
31
32 def GetAPConfigurators(self):
33 return self.ap_list
34
35 def GetAPConfiguratorByShortName(self, name):
36 for ap in self.ap_list:
37 if ap.GetRouterShortName() == name:
38 return ap
39 return None
OLDNEW
« no previous file with comments | « chrome/test/functional/ap_lab/ap_configurator.py ('k') | chrome/test/functional/ap_lab/ap_configurator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698