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

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 10784009: screenshot disabling policy tests (Closed) Base URL: http://git.chromium.org/chromium/src.git@disable_screenshots
Patch Set: Updated accelerator_action.h Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698