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

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

Issue 256003003: Enable Automatic Passwords Saving (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 6 years, 8 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/browser/password_manager/chrome_password_manager_client_unittest.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
index 7c41f7e3f56395b9eb903add4eaf392bf7ed25e0..21a8d6d85a67d0b23ba90903617b5047c8f6a141 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
+
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
@@ -76,3 +78,13 @@ TEST_F(ChromePasswordManagerClientTest, LogSavePasswordProgressDetachLogger) {
client->LogSavePasswordProgress(kTestText);
EXPECT_FALSE(client->IsLoggingActive());
}
+
+TEST_F(ChromePasswordManagerClientTest, IsAutomaticPasswordSavingEnabledTest) {
vabr (Chromium) 2014/04/29 09:08:26 nit: please split this test into two: one testing
rchtara 2014/04/29 12:20:08 Done.
+ ChromePasswordManagerClient* client = GetClient();
+ EXPECT_FALSE(client->IsAutomaticPasswordSavingEnabled());
+
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ password_manager::switches::kEnableAutomaticPasswordSaving);
+
+ EXPECT_TRUE(client->IsAutomaticPasswordSavingEnabled());
+}

Powered by Google App Engine
This is Rietveld 408576698