| 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/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 CheckUint32Attribute(item, "type", form.type); | 393 CheckUint32Attribute(item, "type", form.type); |
| 394 CheckUint32Attribute(item, "times_used", form.times_used); | 394 CheckUint32Attribute(item, "times_used", form.times_used); |
| 395 CheckUint32Attribute(item, "scheme", form.scheme); | 395 CheckUint32Attribute(item, "scheme", form.scheme); |
| 396 CheckStringAttribute( | 396 CheckStringAttribute( |
| 397 item, "date_synced", | 397 item, "date_synced", |
| 398 base::Int64ToString(form.date_synced.ToInternalValue())); | 398 base::Int64ToString(form.date_synced.ToInternalValue())); |
| 399 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name)); | 399 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name)); |
| 400 CheckStringAttribute(item, "avatar_url", form.icon_url.spec()); | 400 CheckStringAttribute(item, "avatar_url", form.icon_url.spec()); |
| 401 CheckStringAttribute(item, "federation_url", | 401 CheckStringAttribute(item, "federation_url", |
| 402 form.federation_origin.Serialize()); | 402 form.federation_origin.Serialize()); |
| 403 CheckUint32Attribute(item, "skip_zero_click", form.skip_zero_click); | 403 CheckUint32Attribute(item, "should_skip_zero_click", form.skip_zero_click); |
| 404 CheckUint32Attribute(item, "generation_upload_status", | 404 CheckUint32Attribute(item, "generation_upload_status", |
| 405 form.generation_upload_status); | 405 form.generation_upload_status); |
| 406 CheckStringAttribute(item, "application", app_string); | 406 CheckStringAttribute(item, "application", app_string); |
| 407 autofill::FormData actual; | 407 autofill::FormData actual; |
| 408 DeserializeFormDataFromBase64String( | 408 DeserializeFormDataFromBase64String( |
| 409 static_cast<char*>(g_hash_table_lookup(item->attributes, "form_data")), | 409 static_cast<char*>(g_hash_table_lookup(item->attributes, "form_data")), |
| 410 &actual); | 410 &actual); |
| 411 EXPECT_TRUE(form.form_data.SameFormAs(actual)); | 411 EXPECT_TRUE(form.form_data.SameFormAs(actual)); |
| 412 } | 412 } |
| 413 | 413 |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 EXPECT_EQ(form_google_, *form_list[0]); | 927 EXPECT_EQ(form_google_, *form_list[0]); |
| 928 | 928 |
| 929 EXPECT_EQ(1u, global_mock_libsecret_items->size()); | 929 EXPECT_EQ(1u, global_mock_libsecret_items->size()); |
| 930 if (!global_mock_libsecret_items->empty()) { | 930 if (!global_mock_libsecret_items->empty()) { |
| 931 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, | 931 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, |
| 932 "chrome-42"); | 932 "chrome-42"); |
| 933 } | 933 } |
| 934 } | 934 } |
| 935 | 935 |
| 936 // TODO(mdm): add more basic tests here at some point. | 936 // TODO(mdm): add more basic tests here at some point. |
| OLD | NEW |