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

Side by Side Diff: tools/chrome_remote_control/chrome_remote_control/__init__.py

Issue 10984018: [chrome_remote_control] Add pylint to PRESUMMIT and fix lint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 2 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
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 """A library for chrome-based tests. 4 """A library for chrome-based tests.
5 5
6 """ 6 """
7 from chrome_remote_control.browser_finder import * 7 from chrome_remote_control.browser_finder import FindBrowser
8 from chrome_remote_control.browser_options import * 8 from chrome_remote_control.browser_finder import GetAllAvailableBrowserTypes
9 from chrome_remote_control.browser import * 9 from chrome_remote_control.browser_options import BrowserOptions
10 from chrome_remote_control.tab import * 10 from chrome_remote_control.browser import Browser
11 from chrome_remote_control.util import * 11 from chrome_remote_control.tab import Tab
12 from chrome_remote_control.util import TimeoutException, WaitFor
12 13
13 def CreateBrowser(browser_type): 14 def CreateBrowser(browser_type):
14 """Shorthand way to create a browser of a given type 15 """Shorthand way to create a browser of a given type
15 16
16 However, note that the preferred way to create a browser is: 17 However, note that the preferred way to create a browser is:
17 options = BrowserOptions() 18 options = BrowserOptions()
18 _, leftover_args, = options.CreateParser().parse_args() 19 _, leftover_args, = options.CreateParser().parse_args()
19 browser_to_create = FindBrowser(options) 20 browser_to_create = FindBrowser(options)
20 return browser_to_create.Create() 21 return browser_to_create.Create()
21 22
22 as it creates more opportunities for customization and 23 as it creates more opportunities for customization and
23 error handling.""" 24 error handling."""
24 browser_to_create = FindBrowser(BrowserOptions(browser_type)) 25 browser_to_create = FindBrowser(BrowserOptions(browser_type))
25 if not browser_to_create: 26 if not browser_to_create:
26 raise Exception('No browser of type %s found' % browser_type) 27 raise Exception('No browser of type %s found' % browser_type)
27 return browser_to_create.Create() 28 return browser_to_create.Create()
OLDNEW
« no previous file with comments | « tools/chrome_remote_control/PRESUBMIT.py ('k') | tools/chrome_remote_control/chrome_remote_control/adb_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698