| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 forms.push_back(&form_google_); | 950 forms.push_back(&form_google_); |
| 951 ExpectationArray expected; | 951 ExpectationArray expected; |
| 952 expected.push_back(make_pair(std::string(form_google_.signon_realm), forms)); | 952 expected.push_back(make_pair(std::string(form_google_.signon_realm), forms)); |
| 953 CheckPasswordForms("Chrome Form Data (42)", expected); | 953 CheckPasswordForms("Chrome Form Data (42)", expected); |
| 954 } | 954 } |
| 955 | 955 |
| 956 TEST_P(NativeBackendKWalletTest, AndroidCredentials) { | 956 TEST_P(NativeBackendKWalletTest, AndroidCredentials) { |
| 957 NativeBackendKWalletStub backend(42, desktop_env_); | 957 NativeBackendKWalletStub backend(42, desktop_env_); |
| 958 EXPECT_TRUE(backend.InitWithBus(mock_session_bus_)); | 958 EXPECT_TRUE(backend.InitWithBus(mock_session_bus_)); |
| 959 | 959 |
| 960 PasswordForm observed_android_form; | 960 PasswordForm saved_android_form; |
| 961 observed_android_form.scheme = PasswordForm::SCHEME_HTML; | 961 saved_android_form.scheme = PasswordForm::SCHEME_HTML; |
| 962 observed_android_form.signon_realm = | 962 saved_android_form.signon_realm = |
| 963 "android://7x7IDboo8u9YKraUsbmVkuf1-@net.rateflix.app/"; | 963 "android://7x7IDboo8u9YKraUsbmVkuf1-@net.rateflix.app/"; |
| 964 PasswordForm saved_android_form = observed_android_form; | |
| 965 saved_android_form.username_value = base::UTF8ToUTF16("randomusername"); | 964 saved_android_form.username_value = base::UTF8ToUTF16("randomusername"); |
| 966 saved_android_form.password_value = base::UTF8ToUTF16("password"); | 965 saved_android_form.password_value = base::UTF8ToUTF16("password"); |
| 967 | 966 |
| 967 password_manager::PasswordStore::FormDigest observed_android_form( |
| 968 saved_android_form); |
| 968 BrowserThread::PostTaskAndReplyWithResult( | 969 BrowserThread::PostTaskAndReplyWithResult( |
| 969 BrowserThread::DB, FROM_HERE, | 970 BrowserThread::DB, FROM_HERE, |
| 970 base::Bind(&NativeBackendKWalletStub::AddLogin, | 971 base::Bind(&NativeBackendKWalletStub::AddLogin, |
| 971 base::Unretained(&backend), saved_android_form), | 972 base::Unretained(&backend), saved_android_form), |
| 972 base::Bind(&CheckPasswordChanges, | 973 base::Bind(&CheckPasswordChanges, |
| 973 PasswordStoreChangeList(1, PasswordStoreChange( | 974 PasswordStoreChangeList(1, PasswordStoreChange( |
| 974 PasswordStoreChange::ADD, saved_android_form)))); | 975 PasswordStoreChange::ADD, saved_android_form)))); |
| 975 | 976 |
| 976 ScopedVector<autofill::PasswordForm> form_list; | 977 ScopedVector<autofill::PasswordForm> form_list; |
| 977 BrowserThread::PostTaskAndReplyWithResult( | 978 BrowserThread::PostTaskAndReplyWithResult( |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 CheckVersion7Pickle(); | 1430 CheckVersion7Pickle(); |
| 1430 } | 1431 } |
| 1431 | 1432 |
| 1432 TEST_F(NativeBackendKWalletPickleTest, CheckVersion8Pickle) { | 1433 TEST_F(NativeBackendKWalletPickleTest, CheckVersion8Pickle) { |
| 1433 CheckVersion8Pickle(); | 1434 CheckVersion8Pickle(); |
| 1434 } | 1435 } |
| 1435 | 1436 |
| 1436 TEST_F(NativeBackendKWalletPickleTest, CheckVersion9Pickle) { | 1437 TEST_F(NativeBackendKWalletPickleTest, CheckVersion9Pickle) { |
| 1437 CheckVersion9Pickle(); | 1438 CheckVersion9Pickle(); |
| 1438 } | 1439 } |
| OLD | NEW |