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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller_unittest.mm

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Rebase. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller_unittest.mm
index 9204e8718582c2f1c21ed30605830fbb0def2769..84a8a53a82f67f3eab83b4ed71b37dfb47a4a9bd 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller_unittest.mm
@@ -4,6 +4,7 @@
#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_blacklist_view_controller.h"
@@ -75,12 +76,12 @@ TEST_F(ManagePasswordsBubbleBlacklistViewControllerTest,
TEST_F(ManagePasswordsBubbleBlacklistViewControllerTest,
ShouldDismissAndUnblacklistWhenUnblacklistClicked) {
// Unblacklisting requires passwords to exist for the site.
- autofill::PasswordForm form;
- form.username_value = base::ASCIIToUTF16("username");
- form.password_value = base::ASCIIToUTF16("password");
- form.blacklisted_by_user = true;
+ scoped_ptr<autofill::PasswordForm> form(new autofill::PasswordForm);
+ form->username_value = base::ASCIIToUTF16("username");
+ form->password_value = base::ASCIIToUTF16("password");
+ form->blacklisted_by_user = true;
autofill::PasswordFormMap map;
- map[base::ASCIIToUTF16("username")] = &form;
+ map.insert(base::ASCIIToUTF16("username"), form.Pass());
ui_controller()->OnBlacklistBlockedAutofill(map);
EXPECT_EQ(password_manager::ui::BLACKLIST_STATE, ui_controller()->state());

Powered by Google App Engine
This is Rietveld 408576698