| 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 <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 <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 CheckUint32Attribute(item, "blacklisted_by_user", form.blacklisted_by_user); | 486 CheckUint32Attribute(item, "blacklisted_by_user", form.blacklisted_by_user); |
| 487 CheckUint32Attribute(item, "type", form.type); | 487 CheckUint32Attribute(item, "type", form.type); |
| 488 CheckUint32Attribute(item, "times_used", form.times_used); | 488 CheckUint32Attribute(item, "times_used", form.times_used); |
| 489 CheckUint32Attribute(item, "scheme", form.scheme); | 489 CheckUint32Attribute(item, "scheme", form.scheme); |
| 490 CheckStringAttribute(item, "date_synced", base::Int64ToString( | 490 CheckStringAttribute(item, "date_synced", base::Int64ToString( |
| 491 form.date_synced.ToInternalValue())); | 491 form.date_synced.ToInternalValue())); |
| 492 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name)); | 492 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name)); |
| 493 CheckStringAttribute(item, "avatar_url", form.icon_url.spec()); | 493 CheckStringAttribute(item, "avatar_url", form.icon_url.spec()); |
| 494 CheckStringAttribute(item, "federation_url", | 494 CheckStringAttribute(item, "federation_url", |
| 495 form.federation_origin.Serialize()); | 495 form.federation_origin.Serialize()); |
| 496 CheckUint32Attribute(item, "skip_zero_click", form.skip_zero_click); | 496 CheckUint32Attribute(item, "should_skip_zero_click", form.skip_zero_click); |
| 497 CheckUint32Attribute(item, "generation_upload_status", | 497 CheckUint32Attribute(item, "generation_upload_status", |
| 498 form.generation_upload_status); | 498 form.generation_upload_status); |
| 499 CheckStringAttribute(item, "application", app_string); | 499 CheckStringAttribute(item, "application", app_string); |
| 500 autofill::FormData actual; | 500 autofill::FormData actual; |
| 501 DeserializeFormDataFromBase64String( | 501 DeserializeFormDataFromBase64String( |
| 502 item->attributes.at("form_data").value_string, &actual); | 502 item->attributes.at("form_data").value_string, &actual); |
| 503 EXPECT_TRUE(form.form_data.SameFormAs(actual)); | 503 EXPECT_TRUE(form.form_data.SameFormAs(actual)); |
| 504 } | 504 } |
| 505 | 505 |
| 506 // Saves |credentials| and then gets logins matching |url| and |scheme|. | 506 // Saves |credentials| and then gets logins matching |url| and |scheme|. |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 base::Bind(&CheckTrue)); | 1237 base::Bind(&CheckTrue)); |
| 1238 | 1238 |
| 1239 RunBothThreads(); | 1239 RunBothThreads(); |
| 1240 | 1240 |
| 1241 EXPECT_EQ(2u, form_list.size()); | 1241 EXPECT_EQ(2u, form_list.size()); |
| 1242 EXPECT_THAT(form_list, UnorderedElementsAre(Pointee(form_google_), | 1242 EXPECT_THAT(form_list, UnorderedElementsAre(Pointee(form_google_), |
| 1243 Pointee(form_facebook_))); | 1243 Pointee(form_facebook_))); |
| 1244 } | 1244 } |
| 1245 | 1245 |
| 1246 // TODO(mdm): add more basic tests here at some point. | 1246 // TODO(mdm): add more basic tests here at some point. |
| OLD | NEW |