OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 901 |
902 // Set the canonical forms to the updated value for the following comparison. | 902 // Set the canonical forms to the updated value for the following comparison. |
903 form_google_.skip_zero_click = true; | 903 form_google_.skip_zero_click = true; |
904 form_facebook_.skip_zero_click = true; | 904 form_facebook_.skip_zero_click = true; |
905 PasswordStoreChangeList expected_changes; | 905 PasswordStoreChangeList expected_changes; |
906 expected_changes.push_back( | 906 expected_changes.push_back( |
907 PasswordStoreChange(PasswordStoreChange::UPDATE, form_facebook_)); | 907 PasswordStoreChange(PasswordStoreChange::UPDATE, form_facebook_)); |
908 | 908 |
909 PasswordStoreChangeList changes; | 909 PasswordStoreChangeList changes; |
910 EXPECT_TRUE(backend.DisableAutoSignInForOrigins( | 910 EXPECT_TRUE(backend.DisableAutoSignInForOrigins( |
911 base::Bind(&GURL::operator==, base::Unretained(&form_facebook_.origin)), | 911 base::Bind(static_cast<bool (*)(const GURL&, const GURL&)>(operator==), |
| 912 form_facebook_.origin), |
912 &changes)); | 913 &changes)); |
913 CheckPasswordChanges(expected_changes, changes); | 914 CheckPasswordChanges(expected_changes, changes); |
914 | 915 |
915 EXPECT_EQ(2u, global_mock_libsecret_items->size()); | 916 EXPECT_EQ(2u, global_mock_libsecret_items->size()); |
916 CheckStringAttribute((*global_mock_libsecret_items)[0], | 917 CheckStringAttribute((*global_mock_libsecret_items)[0], |
917 "origin_url", form_google_.origin.spec()); | 918 "origin_url", form_google_.origin.spec()); |
918 CheckUint32Attribute((*global_mock_libsecret_items)[0], | 919 CheckUint32Attribute((*global_mock_libsecret_items)[0], |
919 "should_skip_zero_click", 0); | 920 "should_skip_zero_click", 0); |
920 CheckStringAttribute((*global_mock_libsecret_items)[1], | 921 CheckStringAttribute((*global_mock_libsecret_items)[1], |
921 "origin_url", form_facebook_.origin.spec()); | 922 "origin_url", form_facebook_.origin.spec()); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 EXPECT_EQ(form_google_, *form_list[0]); | 976 EXPECT_EQ(form_google_, *form_list[0]); |
976 | 977 |
977 EXPECT_EQ(1u, global_mock_libsecret_items->size()); | 978 EXPECT_EQ(1u, global_mock_libsecret_items->size()); |
978 if (!global_mock_libsecret_items->empty()) { | 979 if (!global_mock_libsecret_items->empty()) { |
979 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, | 980 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, |
980 "chrome-42"); | 981 "chrome-42"); |
981 } | 982 } |
982 } | 983 } |
983 | 984 |
984 // TODO(mdm): add more basic tests here at some point. | 985 // TODO(mdm): add more basic tests here at some point. |
OLD | NEW |