Index: chrome/test/pyautolib/pyauto.py |
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py |
index dfe25d69bf43b129f724881405d67290df00a2aa..6acddea05a1e17482f9e13e1f4152dbef71c3112 100755 |
--- a/chrome/test/pyautolib/pyauto.py |
+++ b/chrome/test/pyautolib/pyauto.py |
@@ -5788,6 +5788,24 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): |
return result |
+ def RunAshCommand(self, action): |
+ """Applies accelerator to ASH. |
+ |
+ Apply the accelerator with given id to ASH (ChromeOS only). Action list can |
+ be found in ash/accelerators/accelerator_table.h, AcceleratorAction enum. |
+ |
+ Args: |
+ action: accelerator code (eg. pyauto.TAKE_SCREENSHOT). |
+ |
+ Returns: |
+ A boolean indicating whether the accelerator was handled. |
+ """ |
+ cmd_dict = { |
+ 'command': 'RunAshCommand', |
+ 'action': action |
+ } |
+ return self._GetResultFromJSONRequest(cmd_dict, windex=None) |
+ |
## ChromeOS section -- end |
@@ -6243,15 +6261,15 @@ class Main(object): |
args: [module1, module2, module3.testcase, module4.testcase.testX] |
These modules or test cases or tests should be importable |
- Returns: |
- a list of expanded test names. Example: |
- [ |
- 'module1.TestCase1.testA', |
- 'module1.TestCase1.testB', |
- 'module2.TestCase2.testX', |
- 'module3.testcase.testY', |
- 'module4.testcase.testX' |
- ] |
+ Returns: |
+ a list of expanded test names. Example: |
+ [ |
+ 'module1.TestCase1.testA', |
+ 'module1.TestCase1.testB', |
+ 'module2.TestCase2.testX', |
+ 'module3.testcase.testY', |
+ 'module4.testcase.testX' |
+ ] |
""" |
if not args: # Load tests ourselves |
if self._HasTestCases('__main__'): # we are running a test script |