| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/metrics/histogram_samples.h" | |
| 6 #include "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/test/statistics_delta_reader.h" | |
| 9 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 10 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
| 11 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
| 12 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" | 10 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
| 13 #include "chrome/browser/ui/passwords/manage_passwords_icon_mock.h" | 11 #include "chrome/browser/ui/passwords/manage_passwords_icon_mock.h" |
| 14 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | 12 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" |
| 15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 17 #include "components/autofill/core/common/password_form.h" | 15 #include "components/autofill/core/common/password_form.h" |
| 18 #include "components/password_manager/core/browser/password_form_manager.h" | 16 #include "components/password_manager/core/browser/password_form_manager.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 new password_manager::PasswordFormManager( | 305 new password_manager::PasswordFormManager( |
| 308 NULL, &client, &driver, test_form(), false)); | 306 NULL, &client, &driver, test_form(), false)); |
| 309 | 307 |
| 310 controller()->OnAutomaticPasswordSave(test_form_manager.Pass()); | 308 controller()->OnAutomaticPasswordSave(test_form_manager.Pass()); |
| 311 EXPECT_EQ(password_manager::ui::CONFIRMATION_STATE, controller()->state()); | 309 EXPECT_EQ(password_manager::ui::CONFIRMATION_STATE, controller()->state()); |
| 312 | 310 |
| 313 ManagePasswordsIconMock mock; | 311 ManagePasswordsIconMock mock; |
| 314 controller()->UpdateIconAndBubbleState(&mock); | 312 controller()->UpdateIconAndBubbleState(&mock); |
| 315 EXPECT_EQ(password_manager::ui::MANAGE_STATE, mock.state()); | 313 EXPECT_EQ(password_manager::ui::MANAGE_STATE, mock.state()); |
| 316 } | 314 } |
| OLD | NEW |