| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/password_manager/save_password_infobar_delegate.h" | 5 #include "chrome/browser/password_manager/save_password_infobar_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/macros.h" |
| 9 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 13 #include "components/autofill/core/common/password_form.h" | 14 #include "components/autofill/core/common/password_form.h" |
| 14 #include "components/password_manager/core/browser/password_form_manager.h" | 15 #include "components/password_manager/core/browser/password_form_manager.h" |
| 15 #include "components/password_manager/core/browser/password_manager.h" | 16 #include "components/password_manager/core/browser/password_manager.h" |
| 16 #include "components/password_manager/core/browser/stub_password_manager_client.
h" | 17 #include "components/password_manager/core/browser/stub_password_manager_client.
h" |
| 17 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" | 18 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" |
| 18 #include "components/password_manager/core/common/password_manager_pref_names.h" | 19 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 CreateMockFormManager()); | 174 CreateMockFormManager()); |
| 174 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate( | 175 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate( |
| 175 password_form_manager.Pass(), password_manager::CredentialSourceType:: | 176 password_form_manager.Pass(), password_manager::CredentialSourceType:: |
| 176 CREDENTIAL_SOURCE_PASSWORD_MANAGER, | 177 CREDENTIAL_SOURCE_PASSWORD_MANAGER, |
| 177 false)); | 178 false)); |
| 178 EXPECT_TRUE(infobar->Cancel()); | 179 EXPECT_TRUE(infobar->Cancel()); |
| 179 infobar.reset(); | 180 infobar.reset(); |
| 180 EXPECT_FALSE(prefs()->GetBoolean( | 181 EXPECT_FALSE(prefs()->GetBoolean( |
| 181 password_manager::prefs::kWasSavePrompFirstRunExperienceShown)); | 182 password_manager::prefs::kWasSavePrompFirstRunExperienceShown)); |
| 182 } | 183 } |
| OLD | NEW |