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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_data_source_unittest.cc

Issue 7278008: Fix obvious leak in chrome_web_ui_data_source_unittest.cc, and revert associated suppresions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« 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/webui/chrome_web_ui_data_source_unittest.cc
===================================================================
--- chrome/browser/ui/webui/chrome_web_ui_data_source_unittest.cc (revision 91216)
+++ chrome/browser/ui/webui/chrome_web_ui_data_source_unittest.cc (working copy)
@@ -19,7 +19,6 @@
}
virtual ~MockChromeWebUIDataSource() {
- result_data_ = NULL;
}
// Subvert protected methods.
@@ -45,17 +44,18 @@
class ChromeWebUIDataSourceTest : public testing::Test {
public:
ChromeWebUIDataSourceTest() {}
- MockChromeWebUIDataSource* source() { return source_; }
+ virtual ~ChromeWebUIDataSourceTest() {}
+ MockChromeWebUIDataSource* source() { return source_.get(); }
private:
virtual void SetUp() {
- source_ = new MockChromeWebUIDataSource();
+ source_ = make_scoped_refptr(new MockChromeWebUIDataSource());
}
virtual void TearDown() {
}
- MockChromeWebUIDataSource* source_;
+ scoped_refptr<MockChromeWebUIDataSource> source_;
};
TEST_F(ChromeWebUIDataSourceTest, EmptyStrings) {
« 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