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

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

Issue 2777283004: Do not build Password Reuse on Android and iOS (Closed)
Patch Set: Changed #ifdef to OS defines Created 3 years, 8 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
« no previous file with comments | « components/password_manager/core/browser/password_store.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The passwords in the tests below are all empty because PasswordStoreDefault 5 // The passwords in the tests below are all empty because PasswordStoreDefault
6 // does not store the actual passwords on OS X (they are stored in the Keychain 6 // does not store the actual passwords on OS X (they are stored in the Keychain
7 // instead). We could special-case it, but it is easier to just have empty 7 // instead). We could special-case it, but it is easier to just have empty
8 // passwords. This will not be needed anymore if crbug.com/466638 is fixed. 8 // passwords. This will not be needed anymore if crbug.com/466638 is fixed.
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 837
838 // Since GetAutofillableLoginsWithAffiliatedRealms schedules a request for 838 // Since GetAutofillableLoginsWithAffiliatedRealms schedules a request for
839 // affiliated realms to UI thread, don't shutdown UI thread until there are 839 // affiliated realms to UI thread, don't shutdown UI thread until there are
840 // no tasks in the UI queue. 840 // no tasks in the UI queue.
841 base::RunLoop().RunUntilIdle(); 841 base::RunLoop().RunUntilIdle();
842 store->ShutdownOnUIThread(); 842 store->ShutdownOnUIThread();
843 base::RunLoop().RunUntilIdle(); 843 base::RunLoop().RunUntilIdle();
844 } 844 }
845 } 845 }
846 846
847 // TODO(crbug.com/706392): Fix password reuse detection for Android.
848 #if !defined(OS_ANDROID) && !defined(OS_IOS)
847 TEST_F(PasswordStoreTest, CheckPasswordReuse) { 849 TEST_F(PasswordStoreTest, CheckPasswordReuse) {
848 static constexpr PasswordFormData kTestCredentials[] = { 850 static constexpr PasswordFormData kTestCredentials[] = {
849 {PasswordForm::SCHEME_HTML, "https://www.google.com", 851 {PasswordForm::SCHEME_HTML, "https://www.google.com",
850 "https://www.google.com", "", L"", L"", L"", L"", L"password", true, 1}, 852 "https://www.google.com", "", L"", L"", L"", L"", L"password", true, 1},
851 {PasswordForm::SCHEME_HTML, "https://facebook.com", 853 {PasswordForm::SCHEME_HTML, "https://facebook.com",
852 "https://facebook.com", "", L"", L"", L"", L"", L"topsecret", true, 1}}; 854 "https://facebook.com", "", L"", L"", L"", L"", L"topsecret", true, 1}};
853 855
854 #if defined(OS_MACOSX) 856 #if defined(OS_MACOSX)
855 // Mock Keychain. There is a call to Keychain on initializling 857 // Mock Keychain. There is a call to Keychain on initializling
856 // PasswordReuseDetector, so it should be mocked. 858 // PasswordReuseDetector, so it should be mocked.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 &mock_consumer); 894 &mock_consumer);
893 base::RunLoop().RunUntilIdle(); 895 base::RunLoop().RunUntilIdle();
894 } 896 }
895 897
896 store->ShutdownOnUIThread(); 898 store->ShutdownOnUIThread();
897 base::RunLoop().RunUntilIdle(); 899 base::RunLoop().RunUntilIdle();
898 #if defined(OS_MACOSX) 900 #if defined(OS_MACOSX)
899 OSCryptMocker::TearDown(); 901 OSCryptMocker::TearDown();
900 #endif 902 #endif
901 } 903 }
904 #endif
902 905
903 } // namespace password_manager 906 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/password_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698