diff options
author | dennisjeffrey@google.com <dennisjeffrey@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 22:15:31 +0000 |
---|---|---|
committer | dennisjeffrey@google.com <dennisjeffrey@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 22:15:31 +0000 |
commit | cef7a5e3915d34a95fdad3024b5d48a33bd3c2aa (patch) | |
tree | aa8e368e39a8ae0c13389af65a32ff058578c639 /chrome/test/pyautolib | |
parent | e117df3aa43e7b5172fac07a0275233fb0674951 (diff) | |
download | chromium_src-cef7a5e3915d34a95fdad3024b5d48a33bd3c2aa.zip chromium_src-cef7a5e3915d34a95fdad3024b5d48a33bd3c2aa.tar.gz chromium_src-cef7a5e3915d34a95fdad3024b5d48a33bd3c2aa.tar.bz2 |
New automation hook to launch an app, with sample PyAuto test.
BUG=75205
TEST=None
Review URL: http://codereview.chromium.org/6815024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rw-r--r-- | chrome/test/pyautolib/pyauto.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 4702a68..ea34c54 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -2302,6 +2302,25 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): """ return self.UninstallExtensionById(app_id) + def LaunchApp(self, app_id): + """Opens the New Tab Page and launches the specified app from it. + + This method will not return until after the contents of a new tab for the + launched app have stopped loading. + + Args: + app_id: The string ID of the app to launch. + + Raises: + pyauto_errors.JSONInterfaceError if the automation call returns an error. + """ + self.AppendTab(GURL('chrome://newtab')) # Also activates this tab. + cmd_dict = { + 'command': 'LaunchApp', + 'id': app_id, + } + return self._GetResultFromJSONRequest(cmd_dict) + def KillRendererProcess(self, pid): """Kills the given renderer process. |