Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: components/password_manager/core/browser/password_form_manager_unittest.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/password_manager/core/browser/password_form_manager.h" 5 #include "components/password_manager/core/browser/password_form_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/prefs/pref_registry_simple.h"
13 #include "base/prefs/pref_service.h"
14 #include "base/prefs/testing_pref_service.h"
15 #include "base/run_loop.h" 12 #include "base/run_loop.h"
16 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
17 #include "base/test/histogram_tester.h" 14 #include "base/test/histogram_tester.h"
18 #include "build/build_config.h" 15 #include "build/build_config.h"
19 #include "components/autofill/core/browser/autofill_manager.h" 16 #include "components/autofill/core/browser/autofill_manager.h"
20 #include "components/autofill/core/browser/test_autofill_client.h" 17 #include "components/autofill/core/browser/test_autofill_client.h"
21 #include "components/autofill/core/browser/test_autofill_driver.h" 18 #include "components/autofill/core/browser/test_autofill_driver.h"
22 #include "components/autofill/core/browser/test_personal_data_manager.h" 19 #include "components/autofill/core/browser/test_personal_data_manager.h"
23 #include "components/autofill/core/common/autofill_pref_names.h" 20 #include "components/autofill/core/common/autofill_pref_names.h"
24 #include "components/autofill/core/common/password_form.h" 21 #include "components/autofill/core/common/password_form.h"
25 #include "components/password_manager/core/browser/credentials_filter.h" 22 #include "components/password_manager/core/browser/credentials_filter.h"
26 #include "components/password_manager/core/browser/mock_password_store.h" 23 #include "components/password_manager/core/browser/mock_password_store.h"
27 #include "components/password_manager/core/browser/password_manager.h" 24 #include "components/password_manager/core/browser/password_manager.h"
28 #include "components/password_manager/core/browser/password_manager_driver.h" 25 #include "components/password_manager/core/browser/password_manager_driver.h"
29 #include "components/password_manager/core/browser/password_manager_metrics_util .h" 26 #include "components/password_manager/core/browser/password_manager_metrics_util .h"
30 #include "components/password_manager/core/browser/password_manager_test_utils.h " 27 #include "components/password_manager/core/browser/password_manager_test_utils.h "
31 #include "components/password_manager/core/browser/password_store.h" 28 #include "components/password_manager/core/browser/password_store.h"
32 #include "components/password_manager/core/browser/statistics_table.h" 29 #include "components/password_manager/core/browser/statistics_table.h"
33 #include "components/password_manager/core/browser/stub_password_manager_client. h" 30 #include "components/password_manager/core/browser/stub_password_manager_client. h"
34 #include "components/password_manager/core/browser/stub_password_manager_driver. h" 31 #include "components/password_manager/core/browser/stub_password_manager_driver. h"
35 #include "components/password_manager/core/common/password_manager_pref_names.h" 32 #include "components/password_manager/core/common/password_manager_pref_names.h"
33 #include "components/prefs/pref_registry_simple.h"
34 #include "components/prefs/pref_service.h"
35 #include "components/prefs/testing_pref_service.h"
36 #include "testing/gmock/include/gmock/gmock.h" 36 #include "testing/gmock/include/gmock/gmock.h"
37 #include "testing/gtest/include/gtest/gtest.h" 37 #include "testing/gtest/include/gtest/gtest.h"
38 38
39 using autofill::PasswordForm; 39 using autofill::PasswordForm;
40 using base::ASCIIToUTF16; 40 using base::ASCIIToUTF16;
41 using ::testing::_; 41 using ::testing::_;
42 using ::testing::ElementsAre; 42 using ::testing::ElementsAre;
43 using ::testing::Mock; 43 using ::testing::Mock;
44 using ::testing::NiceMock; 44 using ::testing::NiceMock;
45 using ::testing::Pointee; 45 using ::testing::Pointee;
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 EXPECT_EQ(ASCIIToUTF16("new_password"), 2704 EXPECT_EQ(ASCIIToUTF16("new_password"),
2705 form_manager()->pending_credentials().password_value); 2705 form_manager()->pending_credentials().password_value);
2706 EXPECT_EQ(base::string16(), 2706 EXPECT_EQ(base::string16(),
2707 form_manager()->pending_credentials().username_value); 2707 form_manager()->pending_credentials().username_value);
2708 EXPECT_TRUE( 2708 EXPECT_TRUE(
2709 form_manager()->pending_credentials().new_password_element.empty()); 2709 form_manager()->pending_credentials().new_password_element.empty());
2710 EXPECT_TRUE(form_manager()->pending_credentials().new_password_value.empty()); 2710 EXPECT_TRUE(form_manager()->pending_credentials().new_password_value.empty());
2711 } 2711 }
2712 2712
2713 } // namespace password_manager 2713 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698