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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc

Issue 12209101: Fix Memory Leak In GrowPopupInSpace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
index 4fbb0359f0ffb37cef90000ac552275d8ed0c7e5..09bd84594bcab35f2a1323b4cc0690c2ddc63011 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
@@ -378,13 +378,18 @@ TEST_F(AutofillPopupControllerUnitTest, GrowPopupInSpace) {
desired_width / 2, desired_height /2, desired_width, desired_height));
for (size_t i = 0; i < element_bounds.size(); ++i) {
- TestAutofillPopupController autofill_popup_controller(&external_delegate_,
- element_bounds[i]);
- autofill_popup_controller.set_display(display);
- autofill_popup_controller.Show(names, names, names, autofill_ids);
+ TestAutofillPopupController* autofill_popup_controller =
+ new TestAutofillPopupController(&external_delegate_,
+ element_bounds[i]);
+
+ autofill_popup_controller->set_display(display);
+ autofill_popup_controller->Show(names, names, names, autofill_ids);
EXPECT_EQ(expected_popup_bounds[i].ToString(),
- autofill_popup_controller.popup_bounds().ToString()) <<
+ autofill_popup_controller->popup_bounds().ToString()) <<
"Popup bounds failed to match for test " << i;
+
+ // Hide the controller to delete it.
+ autofill_popup_controller->DoHide();
}
}
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698