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

Unified Diff: chrome/browser/component_updater/cros_component_installer_unittest.cc

Issue 2902373003: Fix memory leak in unit test (Closed)
Patch Set: address comments from sky Created 3 years, 7 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/component_updater/cros_component_installer_unittest.cc
diff --git a/chrome/browser/component_updater/cros_component_installer_unittest.cc b/chrome/browser/component_updater/cros_component_installer_unittest.cc
index 951771b87b1c6d0210f2b33484dcfb6767c275e8..b723d52f6198195136c9c99f9d42f0a5c2546cfb 100644
--- a/chrome/browser/component_updater/cros_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/cros_component_installer_unittest.cc
@@ -87,10 +87,10 @@ class FakeInstallerTraits : public ComponentInstallerTraits {
void install_callback(update_client::Error error) {}
TEST_F(CrOSComponentInstallerTest, BPPPCompatibleCrOSComponent) {
- auto* bppp = new BrowserProcessPlatformPart();
- ASSERT_EQ(bppp->IsCompatibleCrOSComponent("a"), false);
- bppp->AddCompatibleCrOSComponent("a");
- ASSERT_EQ(bppp->IsCompatibleCrOSComponent("a"), true);
+ BrowserProcessPlatformPart bppp;
+ ASSERT_EQ(bppp.IsCompatibleCrOSComponent("a"), false);
+ bppp.AddCompatibleCrOSComponent("a");
+ ASSERT_EQ(bppp.IsCompatibleCrOSComponent("a"), true);
}
TEST_F(CrOSComponentInstallerTest, RegisterComponentFail) {
« 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