summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 10:31:30 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 10:31:30 +0000
commitbb113091264ecacdffe4ac4cc311a3d8fdfc9abd (patch)
tree2c787420e3ba10735db658f9299f2101f28039cc /views
parentd35c4c7b982eb346fa35064a5efc4d6d3b145a62 (diff)
downloadchromium_src-bb113091264ecacdffe4ac4cc311a3d8fdfc9abd.zip
chromium_src-bb113091264ecacdffe4ac4cc311a3d8fdfc9abd.tar.gz
chromium_src-bb113091264ecacdffe4ac4cc311a3d8fdfc9abd.tar.bz2
Delete test view delegate at end of test
BUG=none TEST=leak 000000002551055A goes away Review URL: http://codereview.chromium.org/6132009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/textfield/textfield_views_model_unittest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/views/controls/textfield/textfield_views_model_unittest.cc b/views/controls/textfield/textfield_views_model_unittest.cc
index f9a3acc..c8580b4 100644
--- a/views/controls/textfield/textfield_views_model_unittest.cc
+++ b/views/controls/textfield/textfield_views_model_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/auto_reset.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "base/utf_string_conversions.h"
@@ -293,7 +294,9 @@ TEST(TextfieldViewsModelTest, SetText) {
#define MAYBE_Clipboard Clipboard
#endif
TEST(TextfieldViewsModelTest, MAYBE_Clipboard) {
- views::ViewsDelegate::views_delegate = new TestViewsDelegate();
+ scoped_ptr<TestViewsDelegate> test_views_delegate(new TestViewsDelegate());
+ AutoReset<views::ViewsDelegate*> auto_reset(
+ &views::ViewsDelegate::views_delegate, test_views_delegate.get());
ui::Clipboard* clipboard
= views::ViewsDelegate::views_delegate->GetClipboard();
string16 initial_clipboard_text;