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

Side by Side Diff: chrome/browser/password_manager/native_backend_gnome_x_unittest.cc

Issue 2127533003: Remove PasswordForm::ssl_valid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust //ios Created 4 years, 5 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
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 #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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 const PasswordForm& actual = actual_list[i].form(); 300 const PasswordForm& actual = actual_list[i].form();
301 301
302 EXPECT_EQ(expected.origin, actual.origin); 302 EXPECT_EQ(expected.origin, actual.origin);
303 EXPECT_EQ(expected.password_value, actual.password_value); 303 EXPECT_EQ(expected.password_value, actual.password_value);
304 EXPECT_EQ(expected.action, actual.action); 304 EXPECT_EQ(expected.action, actual.action);
305 EXPECT_EQ(expected.username_element, actual.username_element); 305 EXPECT_EQ(expected.username_element, actual.username_element);
306 EXPECT_EQ(expected.username_value, actual.username_value); 306 EXPECT_EQ(expected.username_value, actual.username_value);
307 EXPECT_EQ(expected.password_element, actual.password_element); 307 EXPECT_EQ(expected.password_element, actual.password_element);
308 EXPECT_EQ(expected.submit_element, actual.submit_element); 308 EXPECT_EQ(expected.submit_element, actual.submit_element);
309 EXPECT_EQ(expected.signon_realm, actual.signon_realm); 309 EXPECT_EQ(expected.signon_realm, actual.signon_realm);
310 EXPECT_EQ(expected.ssl_valid, actual.ssl_valid);
311 EXPECT_EQ(expected.preferred, actual.preferred); 310 EXPECT_EQ(expected.preferred, actual.preferred);
312 EXPECT_EQ(expected.date_created, actual.date_created); 311 EXPECT_EQ(expected.date_created, actual.date_created);
313 EXPECT_EQ(expected.blacklisted_by_user, actual.blacklisted_by_user); 312 EXPECT_EQ(expected.blacklisted_by_user, actual.blacklisted_by_user);
314 EXPECT_EQ(expected.type, actual.type); 313 EXPECT_EQ(expected.type, actual.type);
315 EXPECT_EQ(expected.times_used, actual.times_used); 314 EXPECT_EQ(expected.times_used, actual.times_used);
316 EXPECT_EQ(expected.scheme, actual.scheme); 315 EXPECT_EQ(expected.scheme, actual.scheme);
317 EXPECT_EQ(expected.date_synced, actual.date_synced); 316 EXPECT_EQ(expected.date_synced, actual.date_synced);
318 EXPECT_EQ(expected.display_name, actual.display_name); 317 EXPECT_EQ(expected.display_name, actual.display_name);
319 EXPECT_EQ(expected.icon_url, actual.icon_url); 318 EXPECT_EQ(expected.icon_url, actual.icon_url);
320 EXPECT_EQ(expected.federation_origin.Serialize(), 319 EXPECT_EQ(expected.federation_origin.Serialize(),
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 460 }
462 } 461 }
463 462
464 void CheckMockKeyringItem(const MockKeyringItem* item, 463 void CheckMockKeyringItem(const MockKeyringItem* item,
465 const PasswordForm& form, 464 const PasswordForm& form,
466 const std::string& app_string) { 465 const std::string& app_string) {
467 // We always add items to the login keyring. 466 // We always add items to the login keyring.
468 EXPECT_EQ("login", item->keyring); 467 EXPECT_EQ("login", item->keyring);
469 EXPECT_EQ(form.origin.spec(), item->display_name); 468 EXPECT_EQ(form.origin.spec(), item->display_name);
470 EXPECT_EQ(UTF16ToUTF8(form.password_value), item->password); 469 EXPECT_EQ(UTF16ToUTF8(form.password_value), item->password);
471 EXPECT_EQ(22u, item->attributes.size()); 470 EXPECT_EQ(21u, item->attributes.size());
472 CheckStringAttribute(item, "origin_url", form.origin.spec()); 471 CheckStringAttribute(item, "origin_url", form.origin.spec());
473 CheckStringAttribute(item, "action_url", form.action.spec()); 472 CheckStringAttribute(item, "action_url", form.action.spec());
474 CheckStringAttribute(item, "username_element", 473 CheckStringAttribute(item, "username_element",
475 UTF16ToUTF8(form.username_element)); 474 UTF16ToUTF8(form.username_element));
476 CheckStringAttribute(item, "username_value", 475 CheckStringAttribute(item, "username_value",
477 UTF16ToUTF8(form.username_value)); 476 UTF16ToUTF8(form.username_value));
478 CheckStringAttribute(item, "password_element", 477 CheckStringAttribute(item, "password_element",
479 UTF16ToUTF8(form.password_element)); 478 UTF16ToUTF8(form.password_element));
480 CheckStringAttribute(item, "submit_element", 479 CheckStringAttribute(item, "submit_element",
481 UTF16ToUTF8(form.submit_element)); 480 UTF16ToUTF8(form.submit_element));
482 CheckStringAttribute(item, "signon_realm", form.signon_realm); 481 CheckStringAttribute(item, "signon_realm", form.signon_realm);
483 CheckUint32Attribute(item, "ssl_valid", form.ssl_valid);
484 CheckUint32Attribute(item, "preferred", form.preferred); 482 CheckUint32Attribute(item, "preferred", form.preferred);
485 // We don't check the date created. It varies. 483 // We don't check the date created. It varies.
486 CheckUint32Attribute(item, "blacklisted_by_user", form.blacklisted_by_user); 484 CheckUint32Attribute(item, "blacklisted_by_user", form.blacklisted_by_user);
487 CheckUint32Attribute(item, "type", form.type); 485 CheckUint32Attribute(item, "type", form.type);
488 CheckUint32Attribute(item, "times_used", form.times_used); 486 CheckUint32Attribute(item, "times_used", form.times_used);
489 CheckUint32Attribute(item, "scheme", form.scheme); 487 CheckUint32Attribute(item, "scheme", form.scheme);
490 CheckStringAttribute(item, "date_synced", base::Int64ToString( 488 CheckStringAttribute(item, "date_synced", base::Int64ToString(
491 form.date_synced.ToInternalValue())); 489 form.date_synced.ToInternalValue()));
492 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name)); 490 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name));
493 CheckStringAttribute(item, "avatar_url", form.icon_url.spec()); 491 CheckStringAttribute(item, "avatar_url", form.icon_url.spec());
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 base::Bind(&CheckTrue)); 1295 base::Bind(&CheckTrue));
1298 1296
1299 RunBothThreads(); 1297 RunBothThreads();
1300 1298
1301 EXPECT_EQ(2u, form_list.size()); 1299 EXPECT_EQ(2u, form_list.size());
1302 EXPECT_THAT(form_list, UnorderedElementsAre(Pointee(form_google_), 1300 EXPECT_THAT(form_list, UnorderedElementsAre(Pointee(form_google_),
1303 Pointee(form_facebook_))); 1301 Pointee(form_facebook_)));
1304 } 1302 }
1305 1303
1306 // TODO(mdm): add more basic tests here at some point. 1304 // TODO(mdm): add more basic tests here at some point.
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/native_backend_gnome_x.cc ('k') | chrome/browser/password_manager/native_backend_kwallet_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698