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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2722293004: Hide password saving UI for automated tests. (Closed)
Patch Set: don't split up the && expression Created 3 years, 9 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 | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/chrome_password_manager_client.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 02ea0fae013b909b3507b17a9bc2e8fd4877b433..32c1eb610a7b3794dc4ef448a4fa826e7108a571 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -208,6 +208,12 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage()
bool ChromePasswordManagerClient::IsSavingAndFillingEnabledForCurrentPage()
const {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAutomation)) {
+ // Disable the password saving UI for automated tests. It obscures the
+ // page, and there is no API to access (or dismiss) UI bubbles/infobars.
+ return false;
+ }
// TODO(melandory): remove saving_and_filling_passwords_enabled_ check from
// here once we decide to switch to new settings behavior for everyone.
return *saving_and_filling_passwords_enabled_ && !IsOffTheRecord() &&
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698