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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 new password_manager::PasswordFormManager( | 317 new password_manager::PasswordFormManager( |
320 NULL, &client, &driver, test_form(), false)); | 318 NULL, &client, &driver, test_form(), false)); |
321 | 319 |
322 controller()->OnAutomaticPasswordSave(test_form_manager.Pass()); | 320 controller()->OnAutomaticPasswordSave(test_form_manager.Pass()); |
323 EXPECT_EQ(password_manager::ui::CONFIRMATION_STATE, controller()->state()); | 321 EXPECT_EQ(password_manager::ui::CONFIRMATION_STATE, controller()->state()); |
324 | 322 |
325 ManagePasswordsIconMock mock; | 323 ManagePasswordsIconMock mock; |
326 controller()->UpdateIconAndBubbleState(&mock); | 324 controller()->UpdateIconAndBubbleState(&mock); |
327 EXPECT_EQ(password_manager::ui::MANAGE_STATE, mock.state()); | 325 EXPECT_EQ(password_manager::ui::MANAGE_STATE, mock.state()); |
328 } | 326 } |
OLD | NEW |