summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-08 18:47:16 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-08 18:47:16 +0000
commit312009aa4bb1d7c6069d23ceedb8477d65ffab03 (patch)
tree24a6a28644d8ebd336029dc897a287ad254a4cc6
parentb6ad7bab7995831a30872cf7016b8bad2289c9aa (diff)
downloadchromium_src-312009aa4bb1d7c6069d23ceedb8477d65ffab03.zip
chromium_src-312009aa4bb1d7c6069d23ceedb8477d65ffab03.tar.gz
chromium_src-312009aa4bb1d7c6069d23ceedb8477d65ffab03.tar.bz2
[Mac] Fix valgrind AutocompleteTextFieldTest.
http://codereview.chromium.org/577028 caught the change to the cell unit test, but didn't catch the field version. Pull in that change. BUG=34110 TEST=Valgrind stops complaining. Review URL: http://codereview.chromium.org/570061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38369 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_unittest.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field_unittest.mm b/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
index 3e599e7..8b3c00b 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
@@ -46,10 +46,18 @@ class MockPageActionImageView : public LocationBarViewMac::PageActionImageView {
bool mouse_was_pressed_;
};
+// TODO(shess): Consider lifting this to
+// autocomplete_text_field_unittest_helper.h to share this with the
+// cell tests.
class TestPageActionViewList : public LocationBarViewMac::PageActionViewList {
public:
TestPageActionViewList()
: LocationBarViewMac::PageActionViewList(NULL, NULL, NULL) {}
+ ~TestPageActionViewList() {
+ // |~PageActionViewList()| calls delete on the contents of
+ // |views_|, which here are refs to stack objects.
+ views_.clear();
+ }
void Add(LocationBarViewMac::PageActionImageView* view) {
views_.push_back(view);