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

Unified Diff: chrome/browser/utility_process_host_unittest.cc

Issue 149092: Fix 2 memory leaks in UtilityProcessHostTest.ExtensionUnpacker. (Closed)
Patch Set: Created 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/utility_process_host_unittest.cc
diff --git a/chrome/browser/utility_process_host_unittest.cc b/chrome/browser/utility_process_host_unittest.cc
index b48d95a9b4bd1e5df5dde9e6deaccada6bebb04a..b813cb51f3a83a6a236903ce236f572d0a8c49ee 100644
--- a/chrome/browser/utility_process_host_unittest.cc
+++ b/chrome/browser/utility_process_host_unittest.cc
@@ -69,8 +69,9 @@ class TestUtilityProcessHostClient : public UtilityProcessHost::Client {
class TestUtilityProcessHost : public UtilityProcessHost {
public:
TestUtilityProcessHost(TestUtilityProcessHostClient* client,
- MessageLoop* loop_io)
- : UtilityProcessHost(new ResourceDispatcherHost(NULL), client, loop_io) {
+ MessageLoop* loop_io,
+ ResourceDispatcherHost* rdh)
+ : UtilityProcessHost(rdh, client, loop_io) {
}
protected:
@@ -104,9 +105,9 @@ TEST_F(UtilityProcessHostTest, ExtensionUnpacker) {
scoped_refptr<TestUtilityProcessHostClient> client(
new TestUtilityProcessHostClient(&message_loop_));
- TestUtilityProcessHost* process_host = new TestUtilityProcessHost(
- client.get(), &message_loop_);
- process_host->StartExtensionUnpacker(
+ ResourceDispatcherHost rdh(NULL);
+ TestUtilityProcessHost process_host(client.get(), &message_loop_, &rdh);
+ process_host.StartExtensionUnpacker(
temp_extension_dir.AppendASCII("theme.crx"));
message_loop_.Run();
EXPECT_TRUE(client->success());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698