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

Unified Diff: components/test/data/password_manager/automated_tests/environment.py

Issue 891283002: [Password manager tests] Enable "Offer to save password" via webriver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test/data/password_manager/automated_tests/environment.py
diff --git a/components/test/data/password_manager/automated_tests/environment.py b/components/test/data/password_manager/automated_tests/environment.py
index a8b5f9d03321a2d998dac41c2d1366da7c0c2fee..99b6ec078c63ef25b243f6546999e4fe9fbcb7ca 100644
--- a/components/test/data/password_manager/automated_tests/environment.py
+++ b/components/test/data/password_manager/automated_tests/environment.py
@@ -189,6 +189,22 @@ class Environment:
script += "document.querySelector('#clear-browser-data-commit').click();"
self.driver.execute_script(script)
time.sleep(2)
+ # Every time we do something we cache let's enable password saving.
vabr (Chromium) 2015/02/02 09:25:29 possible typo: we cache -> to the cache ?
melandory 2015/02/02 09:35:53 Done.
+ # TODO(melandory): We should check why it's off on a first place.
vabr (Chromium) 2015/02/02 09:25:29 nit: on the first place -> in the first place Also
melandory 2015/02/02 09:35:53 Done.
+ # TODO(melandory): Investigate, maybe there is no need to enable it that
+ # often
vabr (Chromium) 2015/02/02 09:25:29 nit: Missing a full stop at the end of the sentenc
melandory 2015/02/02 09:35:53 Done.
+ self.EnablePasswordsSaving()
+
+ def EnablePasswordsSaving(self):
+ logging.info("\nEnablePasswordSaving\n")
+ self.driver.get("chrome://settings")
+ self.driver.switch_to_frame("settings")
+ script = "document.getElementById('advanced-settings-expander').click();"
+ script += (
+ "if (!document.querySelector('#password-manager-enabled').checked)"
+ "{ document.querySelector('#password-manager-enabled').click();}")
+ self.driver.execute_script(script)
+ time.sleep(2)
def OpenTabAndGoToInternals(self, url):
"""If there is no |self.website_window|, opens a new tab and navigates to
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698