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

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

Issue 7523063: Add a hook for capturing a user profile photo and saving it to file and local state. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased Created 9 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
« no previous file with comments | « chrome/test/functional/chromeos_prefs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index ee6bbe664c72b41e0a19a55edd21f22203fe11dd..d17dec31c2bf31cae75e1b991b29d57f98aa16a8 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -3667,6 +3667,22 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
}
return self._GetResultFromJSONRequest(cmd_dict, windex=-1)
+ def CaptureProfilePhoto(self):
+ """Captures user profile photo on ChromeOS.
+
+ This is done by driving the TakePhotoDialog. The image file is
+ saved on disk and its path is set in the local state preferences.
+
+ A user needs to be logged-in as a precondition. Note that the UI is not
+ destroyed afterwards, a browser restart is necessary if you want
+ to interact with the browser after this call in the same test case.
+
+ Raises:
+ pyauto_errors.JSONInterfaceError if the automation call returns an error.
+ """
+ cmd_dict = { 'command': 'CaptureProfilePhoto' }
+ return self._GetResultFromJSONRequest(cmd_dict)
+
## ChromeOS section -- end
« no previous file with comments | « chrome/test/functional/chromeos_prefs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698