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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 controller()->OnLoginsChanged(list); | 286 controller()->OnLoginsChanged(list); |
289 | 287 |
290 EXPECT_EQ(password_manager::ui::BLACKLIST_STATE, controller()->state()); | 288 EXPECT_EQ(password_manager::ui::BLACKLIST_STATE, controller()->state()); |
291 EXPECT_FALSE(controller()->PasswordPendingUserDecision()); | 289 EXPECT_FALSE(controller()->PasswordPendingUserDecision()); |
292 EXPECT_EQ(test_form().origin, controller()->origin()); | 290 EXPECT_EQ(test_form().origin, controller()->origin()); |
293 | 291 |
294 ManagePasswordsIconMock mock; | 292 ManagePasswordsIconMock mock; |
295 controller()->UpdateIconAndBubbleState(&mock); | 293 controller()->UpdateIconAndBubbleState(&mock); |
296 EXPECT_EQ(password_manager::ui::BLACKLIST_STATE, mock.state()); | 294 EXPECT_EQ(password_manager::ui::BLACKLIST_STATE, mock.state()); |
297 } | 295 } |
OLD | NEW |