| 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..6b3060aff7ea74fe585e56714441b223a0499476 100644
|
| --- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
|
| +++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
|
| @@ -2,10 +2,13 @@
|
| // 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"
|
| #include "components/password_manager/core/browser/password_manager_logger.h"
|
| +#include "components/password_manager/core/common/password_manager_switches.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| @@ -76,3 +79,16 @@ TEST_F(ChromePasswordManagerClientTest, LogSavePasswordProgressDetachLogger) {
|
| client->LogSavePasswordProgress(kTestText);
|
| EXPECT_FALSE(client->IsLoggingActive());
|
| }
|
| +
|
| +TEST_F(ChromePasswordManagerClientTest,
|
| + IsAutomaticPasswordSavingEnabledDefaultBehaviourTest) {
|
| + EXPECT_FALSE(GetClient()->IsAutomaticPasswordSavingEnabled());
|
| +}
|
| +
|
| +TEST_F(ChromePasswordManagerClientTest,
|
| + IsAutomaticPasswordSavingEnabledWhenFlagIsSetTest) {
|
| + CommandLine::ForCurrentProcess()->AppendSwitch(
|
| + password_manager::switches::kEnableAutomaticPasswordSaving);
|
| +
|
| + EXPECT_TRUE(GetClient()->IsAutomaticPasswordSavingEnabled());
|
| +}
|
|
|