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

Unified Diff: chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc

Issue 18660004: Extension activity log database refactoring (step 1) (Closed) Base URL: http://git.chromium.org/chromium/src.git@incognito-tests
Patch Set: Fix potential null pointer dereference Created 7 years, 5 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
Index: chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc
diff --git a/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc
index df279d1d89d3d5da8665e29dd2c94159cafa045b..a1c806d6d8ca42c14f42c58b6e4a0ca88a659dce 100644
--- a/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc
@@ -89,8 +89,7 @@ class StreamWithoutArgsUIPolicyTest : public testing::Test {
};
TEST_F(StreamWithoutArgsUIPolicyTest, Construct) {
- scoped_ptr<ActivityLogPolicy> policy(
- new StreamWithoutArgsUIPolicy(profile_.get()));
+ ActivityLogPolicy* policy = new StreamWithoutArgsUIPolicy(profile_.get());
scoped_refptr<const Extension> extension =
ExtensionBuilder()
.SetManifest(DictionaryBuilder()
@@ -102,11 +101,11 @@ TEST_F(StreamWithoutArgsUIPolicyTest, Construct) {
scoped_ptr<base::ListValue> args(new base::ListValue());
policy->ProcessAction(ActivityLogPolicy::ACTION_API, extension->id(),
std::string("tabs.testMethod"), GURL(), args.get(), NULL);
+ policy->Close();
}
TEST_F(StreamWithoutArgsUIPolicyTest, LogAndFetchActions) {
- scoped_ptr<ActivityLogPolicy> policy(
- new StreamWithoutArgsUIPolicy(profile_.get()));
+ ActivityLogPolicy* policy = new StreamWithoutArgsUIPolicy(profile_.get());
scoped_refptr<const Extension> extension =
ExtensionBuilder()
.SetManifest(DictionaryBuilder()
@@ -127,11 +126,12 @@ TEST_F(StreamWithoutArgsUIPolicyTest, LogAndFetchActions) {
policy->ReadData(extension->id(), 0,
base::Bind(
StreamWithoutArgsUIPolicyTest::RetrieveActions_LogAndFetchActions));
+
+ policy->Close();
}
TEST_F(StreamWithoutArgsUIPolicyTest, LogWithoutArguments) {
- scoped_ptr<ActivityLogPolicy> policy(
- new StreamWithoutArgsUIPolicy(profile_.get()));
+ ActivityLogPolicy* policy = new StreamWithoutArgsUIPolicy(profile_.get());
scoped_refptr<const Extension> extension =
ExtensionBuilder()
.SetManifest(DictionaryBuilder()
@@ -147,6 +147,7 @@ TEST_F(StreamWithoutArgsUIPolicyTest, LogWithoutArguments) {
std::string("tabs.testMethod"), GURL(), args.get(), NULL);
policy->ReadData(extension->id(), 0,
base::Bind(StreamWithoutArgsUIPolicyTest::Arguments_Missing));
+ policy->Close();
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698